summaryrefslogtreecommitdiff
path: root/src/socket.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-12 02:25:42 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-12 03:07:01 +0200
commitb708e7cea941538bfd5e20ce0a723c19b7da7d1d (patch)
tree8d98112fa0c7c4432bd2058eb1e087abad0e0dc5 /src/socket.c
parentf1dfb62962fd25c1fba9d9479cb5df2d23e6712d (diff)
execute: optionally ignore return status of invoked commands
Diffstat (limited to 'src/socket.c')
-rw-r--r--src/socket.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/socket.c b/src/socket.c
index 7ff2927aff..2d113aef30 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -1400,12 +1400,16 @@ static void socket_sigchld_event(Unit *u, pid_t pid, int code, int status) {
s->control_pid = 0;
success = is_clean_exit(code, status);
- s->failure = s->failure || !success;
- if (s->control_command)
+ if (s->control_command) {
exec_status_exit(&s->control_command->exec_status, pid, code, status);
+ if (s->control_command->ignore)
+ success = true;
+ }
+
log_debug("%s control process exited, code=%s status=%i", u->meta.id, sigchld_code_to_string(code), status);
+ s->failure = s->failure || !success;
if (s->control_command && s->control_command->command_next && success) {
log_debug("%s running next command for state %s", u->meta.id, socket_state_to_string(s->state));