Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit da8bf5ea07658a4a6cda679c2b89b48a3f990b37 1 parent 22e7268
Jérémie Koenig authored
Showing with 4 additions and 2 deletions.
  1. +3 −1 sysdeps/mach/hurd/fork.c
  2. +1 −1  sysdeps/mach/hurd/spawni.c
4 sysdeps/mach/hurd/fork.c
View
@@ -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, ());
2  sysdeps/mach/hurd/spawni.c
View
@@ -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. */
Please sign in to comment.
Something went wrong with that request. Please try again.