|
|
| laziness, impatience, and hubris | |
| PerlMonks |
Re^3: Controlling a Perl Daemon with Signalsby sk (Curate) |
| on Aug 06, 2005 at 00:15 UTC ( [id://481436]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
I modified the code to handle TERM signal and sent TERM from command prompt. It caught correctly and gave me expected results. I am guessing this not a web-based prog, if so I am not well-versed to explain why you it is not working for you. Regarding the jch341277's reply on TERM signal, I am not sure whether it is applicable to your case. For example, If the program was entering the condition in the while block, it should execute just one more time and quit as you do not modify $exit_requested inside the while block. Other cases should terminate next time the while condition is evaluated Can you try the sample program which prints "hi" and see if the same problem occurs. If it does it is very strange as it works just fine for me and I don't see any mistakes in your code. However if the above sample code works but not your original code then you might have to check your handle_request() sub. -SK
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||