commit da8bf5ea07658a4a6cda679c2b89b48a3f990b37 Author: Jeremie Koenig Date: Tue Jul 5 00:57:25 2011 +0000 Hurd signals: clear the pending mask in fork and spawn * sysdeps/mach/hurd/fork.c (__fork): Clear pending masks in the child process. * sysdeps/mach/hurd/spawni.c (__spawni): Don't propagate the pending mask to the new process. diff --git a/sysdeps/mach/hurd/fork.c b/sysdeps/mach/hurd/fork.c index a4f3055..c74998d 100644 --- a/sysdeps/mach/hurd/fork.c +++ b/sysdeps/mach/hurd/fork.c @@ -648,8 +648,10 @@ __fork (void) err = __USEPORT (PROC, __proc_getpids (port, &_hurd_pid, &_hurd_ppid, &_hurd_orphaned)); - /* Forking clears the trace flag. */ + /* Forking clears the trace flag and pending masks. */ __sigemptyset (&_hurdsig_traced); + __sigemptyset (&_hurd_global_sigstate->pending); + __sigemptyset (&ss->pending); /* Run things that want to run in the child task to set up. */ RUN_HOOK (_hurd_fork_child_hook, ()); diff --git a/sysdeps/mach/hurd/spawni.c b/sysdeps/mach/hurd/spawni.c index 373da8d..2442e6f 100644 --- a/sysdeps/mach/hurd/spawni.c +++ b/sysdeps/mach/hurd/spawni.c @@ -241,7 +241,7 @@ __spawni (pid_t *pid, const char *file, _hurd_sigstate_lock (ss); ints[INIT_SIGMASK] = ss->blocked; - ints[INIT_SIGPENDING] = _hurd_sigstate_pending (ss); /* XXX really? */ + ints[INIT_SIGPENDING] = 0; ints[INIT_SIGIGN] = 0; /* Unless we were asked to reset all handlers to SIG_DFL, pass down the set of signals that were set to SIG_IGN. */