2001-07-22 Roland McGrath <roland@frob.com>
* hurd/hurdsig.c (_hurd_internal_post_signal): Support SA_RESETHAND and SA_NODEFER options. Spurred to action by Igor Khavkine.
This commit is contained in:
parent
a9d61e2988
commit
5d83494fad
|
@ -926,10 +926,16 @@ _hurd_internal_post_signal (struct hurd_sigstate *ss,
|
||||||
/* Backdoor extra argument to signal handler. */
|
/* Backdoor extra argument to signal handler. */
|
||||||
scp->sc_error = detail->error;
|
scp->sc_error = detail->error;
|
||||||
|
|
||||||
/* Block SIGNO and requested signals while running the handler. */
|
|
||||||
scp->sc_mask = ss->blocked;
|
scp->sc_mask = ss->blocked;
|
||||||
|
|
||||||
|
if ((ss->actions[signo].sa_flags & SA_NODEFER) == 0)
|
||||||
|
/* Block SIGNO and requested signals while running the handler. */
|
||||||
ss->blocked |= __sigmask (signo) | ss->actions[signo].sa_mask;
|
ss->blocked |= __sigmask (signo) | ss->actions[signo].sa_mask;
|
||||||
|
|
||||||
|
if (ss->actions[signo].sa_flags & SA_RESETHAND)
|
||||||
|
/* Silly SysV/Linux compatibility option. */
|
||||||
|
ss->actions[signo].sa_handler = SIG_DFL;
|
||||||
|
|
||||||
/* Start the thread running the handler (or possibly waiting for an
|
/* Start the thread running the handler (or possibly waiting for an
|
||||||
RPC reply before running the handler). */
|
RPC reply before running the handler). */
|
||||||
err = __thread_set_state (ss->thread, MACHINE_THREAD_STATE_FLAVOR,
|
err = __thread_set_state (ss->thread, MACHINE_THREAD_STATE_FLAVOR,
|
||||||
|
|
Loading…
Reference in New Issue