|
From: Jeremy F. <je...@go...> - 2005-02-27 02:31:16
|
Tom Hughes wrote:
>So the main thread (thread 1) calls sigsuspend to wait for the signal
>from the manager thread (thread 2) to say that it is done. Unfortunately
>the signal arrives while the system call is still being setup so we
>decide to restart the system call and wound up sat in sigsuspend waiting
>for a signal that will never arrive.
>
>
Oh, OK, I see what's happening. sigsuspend is supposed to atomically
install the new signal mask and then block waiting for one of those
signals to arrive. That new signal mask is current for any signal
handlers which are executed, but then the old one restored once the
syscall returns (once all the signal handlers have returned).
PRE(*sigsuspend) is putting the temp mask into eff_sig_mask, which then
makes client_syscall set it explicitly with sigprocmask, rather than
letting sigsuspend do its atomic set-then-block thing.
Does this patch fix it for you?
J
|