You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After forking a new process, stdin in the child process is closed and re-opened to /dev/null. It's opened with the flag O_WRONLY. It should be opened with O_RDONLY. For example, if the below program is used within ninja, it will print -1.
Ninja should probably do the same unless there's a particular reason why it opens stdin incorrectly (in which you could just save time by closing stdin and not opening /dev/null.
The text was updated successfully, but these errors were encountered:
After forking a new process, stdin in the child process is closed and re-opened to /dev/null. It's opened with the flag O_WRONLY. It should be opened with O_RDONLY. For example, if the below program is used within ninja, it will print -1.
If you do this in bash, it will print 0.
$ ./a.out < /dev/null
Ninja should probably do the same unless there's a particular reason why it opens stdin incorrectly (in which you could just save time by closing stdin and not opening /dev/null.
The text was updated successfully, but these errors were encountered: