[Chicago-talk] writing a log with Cron, Daemons, Perl

Jay Strauss me at heyjay.com
Tue Sep 9 21:41:24 CDT 2003

Yeah, I am using POE and WWW::Mech, and before I was getting an error trying
to serialize the mech object and pick it up with the poe clients (before I
forked), but I'm not doing that anymore (had problems serializing a https
connection), so I could probably do everything first.  I'll try it

----- Original Message -----
From: "Paul Baker" <pbaker at where2getit.com>
To: "Chicago.pm chatter" <chicago-talk at mail.pm.org>
Sent: Tuesday, September 09, 2003 12:23 PM
Subject: Re: [Chicago-talk] writing a log with Cron, Daemons, Perl

On Monday, September 8, 2003, at 10:41  PM, Jay Strauss wrote:

>> Having said that though, why are you trying to send something to
>> STDOUT? Daemon's aren't supposed to do that, that's why they close
>> them. And you are already writting your debugging to a log via STDERR,
>> so what do you need STDOUT for?
> I thought I'd print the startup messages to the screen and then
> redirect the
> runtime messages to a file

Ah, well in that case, all your startup messages should occur before
you daemonize. Meaning, any start up initialization stuff should occur
before you go into the daemon (and any output should probably go to the
REAL STDERR and not STDOUT). Then once you have done all your init, the
last step before you start your process loop would be to then of course
daemonize and then reopen STDERR to the logfile.

Paul Baker

"Yes, we did produce a near-perfect republic. But will they keep it? Or
will they, in the enjoyment of plenty, lose the memory of freedom?”
          -- Thomas Jefferson in a letter to John Adams

GPG Key: http://homepage.mac.com/pauljbaker/public.asc

Chicago-talk mailing list
Chicago-talk at mail.pm.org

More information about the Chicago-talk mailing list