Quote:
Originally posted by Perderabo
That's up to the program that spawns the process. As a default, most shells will default stdout to /dev/tty. But if, for example, you do:
someprog > /dev/null
then stdout will be pointing to /dev/null.
you mean u-ofile[0] connects to struct tty?
or it still connects first to struct file then to inode?
if it is an ordinary file it will connect like this:
process pa
u-ofile
-------------
| stdin |
-------------
| stdout |
-------------
| stderr | file inode
------------- -------------- ------------
| |------------------------> | |--------->| |
------------- -------------- ------------
Is it like:
process pa
u-ofile
-------------
| stdin | tty
------------- ----------------
| stdout |-----------------------> | |
------------- ---------------
| stderr |
-------------
?
right??