SIGALRM can't be delivered after longjmp from handler?

David A. Gatwood dgatwood at deepspace.mklinux.org
Thu Mar 16 13:25:55 EST 2000


On Wed, 15 Mar 2000, Peter M. Jansson wrote:

> Did that; no effect.

Well, it did for me, but I had to change the location of the signal()
line.  The installation of the signal handler has to occur before the
sigsetjmp or else the longjmp() restores an empty set of handlers.


1.  Move the if (signal(...)) line to right after the printf("Cycle...")
line

2.  Change setjmp(jmp_buf) to sigsetjmp(jmp_buf,1)

3.  Change longjmp to siglongjmp

4.  add a signal(...) line to the beginning of the signal handler

The program then works as it did on *BSD.


David


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list