satchboost has asked for the wisdom of the Perl Monks concerning the following question:
and handling $abort later in the code. Now, on occasion, one of my users has noticed that if he hits CTRL-C, he actually causes a SIGTERM in the select() call I use to act as my heartbeat timer. Why would this happen? I've read through all the books I have and cannot find why this would be.my $abort = 0; my $old_sig_int = $SIG{'INT'} || ''; $SIG{'INT'} = sub { $abort = 1; };
The big problem with this is that Perl 5.005_2 doesn't remove the job from Solaris 2.6. As the application is a resource hog, this causes the server to come to a slow and grinding halt.
1) Is trapping $SIG{'TERM'} going to be useful? 2) Why is select() throwing a SIGTERM in the first place? 3) Why is it just one account and not another? I cannot reproduce it from my account, but can from his at will.
(Yes, I know I should be using Sockets, but I haven't upgraded the application to do so. Perl5.6 isn't coming for a while, so I have to make do with what I've got.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Handling SIGTERM
by AgentM (Curate) on Mar 08, 2001 at 09:26 UTC |