About STDIN_FILENO, STDOUT_FILENO and STDERR_FILENO values
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > About STDIN_FILENO, STDOUT_FILENO and STDERR_FILENO values




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    About STDIN_FILENO, STDOUT_FILENO and STDERR_FILENO values  
Neroku


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-06 12:25 PM

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






[ Post a follow-up to this message ]



    Re: About STDIN_FILENO, STDOUT_FILENO and STDERR_FILENO values  
Nils O. Selåsdal


Report This Message To A Moderator Edit/Delete Message


 
08-27-06 12:25 PM

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





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:56 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register