On Thu, Apr 04, 2002, mulix wrote about "Re: c question":
> On Thu, Apr 04, 2002 at 06:00:36PM +0300, Shlomi Fish wrote:
> 
> >     write(1, "World!\n", 7);
> 
> please use fileno(stdout). daemon writers everywhere will thank you. 

You're right about the existance of the fileno() function, but I'm not sure
I understand your advice. The only reason fileno(stdout) is *ever* going to
be different than 1, is if freopen() is used. freopen() is an even more
obscure function than the fdopen() function I mentioned in a previous
post, and I don't think I ever saw it actually used. Why is it used by
"daemon writers everywhere"?
I guess I'm missing some important point.

-- 
Nadav Har'El                        |      Thursday, Apr 4 2002, 23 Nisan 5762
[EMAIL PROTECTED]             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |Spelling mistakes left in for people who
http://nadav.harel.org.il           |feel the need to correct others.

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to