- Oct 21, 2010The following program works fine on my SPARC solaris system:
int count = 0;
It sits in a loop waiting for a SIGUSR1 signal, and when it comes it prints out that it has seen it. The intention is that if several such signals are received in rapid succession, the first will be actioned and the rest will be queued up and processed on subsequent cycles of the loop. At least, that is AIUI what POSIX says, and also what the slug manual pages seem to imply.
However, running that same program on slugos 5.3, and giving it a
kill -s USR1 <pid of program>
it immediately takes the default action of SIGUSR1 (which is to terminate), even though it is sitting in a sigwait for SIGUSR1 at the time. So I never get to try the effect of multiple kills in rapid succession.
In Solaris, I gave it
kill -s USR1 <pid of program>;kill -s USR1 <pid of program>;kill -s USR1 <pid of program>
and it happily ran take_action three times.
Why doesn't this work in slugos, and what am I doing wrong?
- Next post in topic >>