Actually it does work but the TERM interrupts the currently executing statement. Execution of the script starts with the next statement in the code after the signal handler returns.
If you add the following to your code and run the script using the debugger you'll see what I mean:
sub handle_request { sleep 13; sleep 14; }
In reply to Re: Controlling a Perl Daemon with Signals
by jch341277
in thread Controlling a Perl Daemon with Signals
by eastcoastcoder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |