stdin , stdout and stderr are closed, so that the daemon can successfully disconnect from the tty from which it was launched, and also so that the daemon (or its child processes) does not write to tty when it is running.
If you try to read / write from a private file descriptor, the operation will fail and errno will be set to EBADF ("fildes is not a valid file or socket descriptor open for reading"). Other than that, nothing will happen.
trojanfoe
source share