3 ms·
http://man7.org/linux/man-pages/man3/stdin.3.html http://man7.org/linux/man-pages/man3/stdin.3.html > On program startup, the integer file descriptors associat
by matheusmoreira 7y ago
http://man7.org/linux/man-pages/man3/stdin.3.html http://man7.org/linux/man-pages/man3/stdin.3.html
> On program startup, the integer file descriptors associated with the streams stdin, stdout, and stderr are 0, 1, and 2, respectively.
- emilfihlman 7y agoYou must differentiate between a guarantee by an actual standard and platform specific documentation.
- matheusmoreira 7y agohttps://pubs.opengroup.org/onlinepubs/9699919799/functions/stdin.html https://pubs.opengroup.org/onlinepubs/9699919799/functions/s... > The following symbolic values in <unistd.h> define the file descriptors that shall be associated with the C-language stdin, stdout, and stderr when the application is started: > STDIN_FILENO Standard input value, stdin. Its value is 0. > STDOUT_FILENO Standard output value, stdout. Its value is 1. > STDERR_FILENO Standard error value, stderr. Its value is 2.
- deleted 7y ago[deleted]
- quindecagon 7y ago> On program startup Then, after program startup, if it is closed, then fd 2 could be assigned to something else.