perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Angus Lees" <>
Subject Re: use of STDERR in forked children
Date Tue, 04 Jul 2006 16:13:21 GMT
On 6/28/06, Matthew Smith <> wrote:
> Hi,  I'm working on a mechanism to fork a a long
> running child process.  I've followed the standard
> mod_perl forking wisdom in
> My issue is that warn() doesn't work in the child
> process, though printing directly to STDERR does.

You probably want to reset/check $SIG{__WARN__} .

Also you probably want to reset $SIG{PIPE}, from memory.

Also, I want STDERR to go to the apache log like it
> normally would, but I don't know how to determine what
> the path to the log is. I can't hard code it since it
> changes depending on the environment (dev vs. qa vs.
> prod).

I thought STDERR in the apache process already went to the logfile?  In
which case, just don't change it in your child..

- Gus

View raw message