If a program runs fork() what sets standard streams STDOUT, STDIN and STDERR?
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
|
|
Stdin, stdout and stderr are inherited from the parent process. It's up to the child process to change them to point to new files if that is needed. From the
|
||||
|
|
|
As Kyle Jones states, they're propagated from the parent process. If you're asking how to set them in a child, you're looking for |
|||
|
|
