alarm questions

Khasin Teow khasin at hcrvx2.UUCP
Mon Jul 28 23:09:19 AEST 1986


In article <9250003 at acf4.UUCP> tihor at acf4.UUCP (Stephen Tihor) writes:
>A novice question I am afraid.  Under BSD 4.2 a friend wrote a little 
>infinite sleep loop with a signal handler that displays the signal number.
>His testing with kill implies that the ALARM signal does interupt the
>sleep but doesn't invoke the handler.  But he swears up and down that he set
>the handler for that (He looped to set all the handlers.)


If my assumption is correct in that the "infinite sleep loop"
involves the sleep(3) call, then his SIGALRM handler will not be invoked
when SIGALRM is received since that handler has already been
replaced by the SIGALRM handler in the sleep subroutine.
At least this is true on System V.2.

Kha Sin TEOW @ HCR



More information about the Comp.unix mailing list