What was the signal?

Alan Barclay alan at ukpoit.co.uk
Wed Mar 20 21:41:07 AEST 1991


In article <1991Mar20.113657.1959 at ukpoit.co.uk> howard at ukpoit.co.uk (Howard the Hacker) writes:
>
>I have a C program doing a msgrcv(2) which may be interrupted by a SIGALRM. This
>is processed by a handler function. On return a failure of msgrcv is found
>and found to be due to an interrupt. The question is, will any ignored signal
>(ignored by default) also interrupt the msgrcv, and if so is it possible to find
>out what the actual signal was? If the signal was not SIGALRM, the msgrcv should
>not be tried again, but how can I tell?

catch SIGALRM, using signal(2), set a flag in the signal catching routine,
and check for the flag being set.



More information about the Comp.unix.questions mailing list