in reply to Re: Diagnositc output on background processes
in thread Diagnositc output on background processes
Note that signals in Perl aren't safe even if you just set a flag. This is being fixed but I'm not sure when it will be released. So I'd avoid the signal handler altogether when using Perl.
You could just have a separate file that you periodically
and be sure to include a time stamp in that output (and be sure to turn on autoflush).seek(STATUS,0,0); truncate(STATUS,0); print STATUS, status();
Another fun idea is to listen on a socket and occasionally do a non-blocking accept. If the accept succeeds, then you can output status information via the socket so anyone can "telnet" to that port to see how things are going. Our long-running servers have telnet interfaces where you can not only get detailed status information but also change configuration information, reset statistics, etc. Though doing something like that is a bit tricky in Perl since threading support is still experimental.
- tye (but my friends call me "Tye")
|
|---|