[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wait_event_interruptible and signals



On Tue, Apr 30, 2002 at 03:52:46PM -0500, David Stroupe wrote:
> When wait_event_interruptible returns a non-zero (-ERESTARTSYS)value 
> that indicates that it has been interrupted by a signal.  Is there a way 
> to tell what signal interrupted the wait?

From a brief look at the code it seems, that result of signal_pending is
actually a bitmask of signals to be delivered to a process.
(current->signals is mask of all signals and current->blocked is mask of
blocked signals).

--------------------------------------------------------------------------------
                  				- Jan Hudec `Bulb' <bulb@ucw.cz>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/