|
Home > Archive > Unix Programming > August 2006 > About STDIN_FILENO, STDOUT_FILENO and STDERR_FILENO values
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
About STDIN_FILENO, STDOUT_FILENO and STDERR_FILENO values
|
|
| Neroku 2006-08-27, 7:25 am |
| Hello, I know POSIX compliant code should use STDIN_FILENO,
STDOUT_FILENO and STDERR_FILENO instead of the magic numbers 0,1 and 2.
But my question is:
Does POSIX guarantees that the value of the constants (or whatever they
are) STDIN_FILENO, STDOUT_FILENO and STDERR_FILENO are 0,1 and 2
respectively?
TIA
| |
| Nils O. Selåsdal 2006-08-27, 7:25 am |
| Neroku wrote:
> Hello, I know POSIX compliant code should use STDIN_FILENO,
> STDOUT_FILENO and STDERR_FILENO instead of the magic numbers 0,1 and 2.
>
> But my question is:
> Does POSIX guarantees that the value of the constants (or whatever they
> are) STDIN_FILENO, STDOUT_FILENO and STDERR_FILENO are 0,1 and 2
> respectively?
http://www.opengroup.org/onlinepubs...s/unistd.h.html
|
|
|
|
|