Now if we take that same simple program and either
don't define $SIG{'TERM'} or set it to 'DEFAULT' we
get END when the parent dies, but when we kill the
child &cleanup isn't run (duh) but neither is END. Is
that standard behaviour? I would've thought it'd try
to do END if at all possible to clean
Now if we take that same simple program and either
don't define $SIG{'TERM'} or set it to 'DEFAULT' we
get END when the parent dies, but when we kill the
child &cleanup isn't run (duh) but neither is END. Is
that standard behaviour?
The following is from perlfaq8 (perldoc perlfaq8):
The END
--- Neil Bowers <[EMAIL PROTECTED]> wrote:
> You just need to install a TERM handler routine in
> the child process.
--- Jerry LeVan <[EMAIL PROTECTED]> wrote:
> See http://homepage.mac.com/levanj/LinkSys and grab
> linksys.pl.
Ah thanks. In my foolishness I didn't think to RTFM
(perlipc). Havin
See http://homepage.mac.com/levanj/LinkSys and grab
linksys.pl.
It has a trap handler prints a message to a log file
closes the log file and then exits. (it does some
other interesting stuff if you have a linksys router :)
Jerry
On Aug 19, 2004, at 3:49 PM, wren argetlahm wrote:
I have a perl scrip
I have a perl script (modified from one of Chris
Nandor's) that I run as a background-process/daemon
via fork(). Now I know I can use kill to end it, but I
was wondering if there was a way that I can catch the
SIGTERM to do one last thing before quitting?
You just need to install a TERM handler rou