From 4d02a5b18a0c2702bfca949bc60187f53d6f39d2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 6 Jun 1996 20:49:22 +0000 Subject: Thu Jun 6 16:12:39 1996 Roland McGrath * hurd/hurdsig.c (_hurd_internal_post_signal): For SIGNO==0 pending check, deliver a pending blocked signal if its action might be to ignore. * sysdeps/mach/hurd/sigaction.c: If new action is SIG_IGN or SIG_DFL and SIG is pending, wake up signal thread to check us. * hurd/hurdsig.c (_hurd_internal_post_signal): Don't mark a signal pending while blocked or stopped when the action is to ignore it. * hurd/hurdsig.c (_hurd_internal_post_signal: resume): Only set SS_SUSPENDED when the thread is really suspended. * elf/rtld.c (dl_main): Don't dereference _dl_rtld_map.l_next if null. --- sysdeps/mach/hurd/sigaction.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sysdeps') diff --git a/sysdeps/mach/hurd/sigaction.c b/sysdeps/mach/hurd/sigaction.c index ebe70664be..df28131281 100644 --- a/sysdeps/mach/hurd/sigaction.c +++ b/sysdeps/mach/hurd/sigaction.c @@ -67,6 +67,14 @@ DEFUN(__sigaction, (sig, act, oact), __spin_lock (&ss->lock); pending = ss->pending & ~ss->blocked; } + else if (a.sa_handler == SIG_IGN || a.sa_handler == SIG_DFL) + /* We are changing to an action that might be to ignore SIG signals. + If SIG is blocked and pending and the new action is to ignore it, we + must remove it from the pending set now; if the action is changed + back and then SIG is unblocked, the signal pending now should not + arrive. So wake up the signal thread to check the new state and do + the right thing. */ + pending = ss->pending & __sigmask (sig); else pending = 0; -- cgit 1.4.1