On Tue, 23 Nov 2004, Shaul Karl wrote:
>   What will happen when a daemon process with no controlling terminal
> tries to print to its stdout?

It depends.  Many daemons guard against this by opening /dev/null on
descriptors 0, 1 and 2.

Otherwise, they will get a write error.  Most code doesn't check for them
when printing out messages, so nothing weird happens.

>   More specifically, consider the following pseudo code:

It won't work, it is full of errors :P  and you want to fclose(stdout), too.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to