Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I am trying to write a small server that behaves well when killed from the command line using its PID (i.e. not with CTRL-C). Installing signal handlers works well as long as I use the key-stroke to kill it but if I use the kill shell command no handling code gets called---both the signal handlers and END{} block are ignored (otherwise they get executed). I can't seem to figure out this problem and all my searching has been in vain (maybe I am searching for the wrong thing). Can anyone help out here? People have suggested I am catching the wrong signal but I have handlers installed for all applicable signals AFAIK.
I am not posting sample code since my signal handlers and end block are as simple as they come. This is not a question on how to use them, just a question on why the kill from the shell-command is being ignored by the perl code.
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: signal handler not called
by VSarkiss (Monsignor) on Aug 29, 2001 at 22:20 UTC | |
|
Re: signal handler not called
by dga (Hermit) on Aug 29, 2001 at 22:14 UTC | |
|
Re: signal handler not called
by Zaxo (Archbishop) on Aug 29, 2001 at 22:21 UTC | |
|
Re: signal handler not called
by Anonymous Monk on Aug 29, 2001 at 22:36 UTC |