summaryrefslogtreecommitdiff
path: root/src/shared/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-05-31 23:55:55 +0200
committerLennart Poettering <lennart@poettering.net>2015-06-10 01:28:58 +0200
commitce30c8dcb41dfe9264f79f30c7f51c0e74576638 (patch)
tree2d5c05e1225b43ec3d9870316899c1e87f7f381d /src/shared/util.c
parent0c2c2a3aeb4c348e41d5d634c397faa3aa35cba7 (diff)
tree-wide: whenever we fork off a foreign child process reset signal mask/handlers
Also, when the child is potentially long-running make sure to set a death signal. Also, ignore the result of the reset operations explicitly by casting them to (void).
Diffstat (limited to 'src/shared/util.c')
-rw-r--r--src/shared/util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shared/util.c b/src/shared/util.c
index dc5e938796..a20e7bb2ef 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -2301,8 +2301,8 @@ static int do_execute(char **directories, usec_t timeout, char *argv[]) {
/* We fork this all off from a child process so that we can
* somewhat cleanly make use of SIGALRM to set a time limit */
- reset_all_signal_handlers();
- reset_signal_mask();
+ (void) reset_all_signal_handlers();
+ (void) reset_signal_mask();
assert_se(prctl(PR_SET_PDEATHSIG, SIGTERM) == 0);
@@ -3344,8 +3344,8 @@ int fork_agent(pid_t *pid, const int except[], unsigned n_except, const char *pa
/* Make sure we actually can kill the agent, if we need to, in
* case somebody invoked us from a shell script that trapped
* SIGTERM or so... */
- reset_all_signal_handlers();
- reset_signal_mask();
+ (void) reset_all_signal_handlers();
+ (void) reset_signal_mask();
/* Check whether our parent died before we were able
* to set the death signal and unblock the signals */