OS Linux RH 7.3, ES2.1, ES3.0
question involves repeated use of signals. I've genned up signal support for INT and HUP as follows:
#
# interrupt support
#
use POSIX;
$sigset = POSIX::SigSet->new();
$actINT = POSIX::SigAction->new( 'SigInterrupt', $sigset, &POSIX::SA_N
+ODEFER );
$actHUP = POSIX::SigAction->new( 'SigHangup', $sigset, &POSIX::SA_N
+ODEFER );
POSIX::sigaction( &POSIX::SIGINT, $actINT );
POSIX::sigaction( &POSIX::SIGHUP, $actHUP );
$SIGINT = 0;
$SIGHUP = 0;
The variables $SIG* are just tweaked in the signal handlers. That's all that goes on in the handlers. I look for the tweaked value when I emerge from a select() loop and act accordingly.
This all works fine for the first signal processed. SIGINT causes a delayed exit, as desired. SIGHUP causes state info to go to log, as desired. However, repeating SIGHUP after the first SIGHUP doesn't do diddly. Bigger however, repeating SIGHUP *again* does cause the signal to be noticed. And so it goes, with every other SIGHUP signal apparently being noticed. WTH? Signals are sent to the process at a leisurely interval, on the order of seconds, so I am not believing that there are any signal stacking issues going on here. :-)
Can anybody explain this?
Thanks!
rnd