summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7f71f1b)
raw | patch | inline | side by side (parent: 7f71f1b)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 15 Sep 2009 13:40:47 +0000 (15:40 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 15 Sep 2009 13:40:47 +0000 (15:40 +0200) |
src/exec.c | patch | blob | history |
diff --git a/src/exec.c b/src/exec.c
index 1f8a9ac0ebfb4a7ccfb933192368630c63cd3844..8719201ea956fe3129561889191fddab3f047a35 100644 (file)
--- a/src/exec.c
+++ b/src/exec.c
exit (-1);
} /* void exec_child }}} */
+static void reset_signal_mask (void) /* {{{ */
+{
+ sigset_t ss;
+
+ memset (&ss, 0, sizeof (ss));
+ sigemptyset (&ss);
+ sigprocmask (SIG_SETMASK, &ss, /* old mask = */ NULL);
+} /* }}} void reset_signal_mask */
+
/*
* Creates three pipes (one for reading, one for writing and one for errors),
* forks a child, sets up the pipes so that fd_in is connected to STDIN of
@@ -468,6 +477,9 @@ static int fork_child (program_list_t *pl, int *fd_in, int *fd_out, int *fd_err)
close (fd_pipe_err[1]);
}
+ /* Unblock all signals */
+ reset_signal_mask ();
+
exec_child (pl);
/* does not return */
}