Berger, Daniel
7/13/2006 3:16:00 PM
Rogue Amateur wrote:
> unknown wrote:
>> On Wed, 12 Jul 2006, Rogue Amateur wrote:
>>
>
> [snip]
>
>> fortytwo :~ > daemon sleep 42
>>
>
> So, this works. So does another, innocuous script I wrote. I even
> checked out the daemonize library the other person suggested, and it
> works too. My pain in the butt actually need it to work as a daemon,
> however, does not work.
>
> What could cause code which works in interactive mode to fail in daemon
> mode?
>
> I'm checking the code now, and I do have "if debug" statements which
> output to STDOUT. Could that be the problem?
I'm guessing that the daemon library calls setsid() behind the scenes, in which
case there's no controlling terminal for that process. I would think sending
anything to STDOUT would just disappear into the ether, but I'm not positive.
Regards,
Dan
This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.