summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKyle Russell <bkylerussell@gmail.com>2016-09-10 01:55:36 -0400
committerEvgeny Vereshchagin <evvers@ya.ru>2016-09-10 08:55:36 +0300
commit7dd736abecd8048843d117de56c65bbf489a6f4f (patch)
tree46101f2bfc96de0783afac3e3cac64b8f631472b /src
parentf35c467db30481be231fca0056b132b2214f2d42 (diff)
service: fixup ExecStop for socket-activated shutdown (#4120)
Previous fix didn't consider handling multiple ExecStop commands.
Diffstat (limited to 'src')
-rw-r--r--src/core/service.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/service.c b/src/core/service.c
index 57f8d90ee5..99a70395fc 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -1261,8 +1261,7 @@ static int service_spawn(
/* ENOTCONN is legitimate if the endpoint disappeared on shutdown.
* This connection is over, but the socket unit lives on. */
- if (r != -ENOTCONN ||
- (c != s->exec_command[SERVICE_EXEC_STOP] && c != s->exec_command[SERVICE_EXEC_STOP_POST]))
+ if (r != -ENOTCONN || !IN_SET(s->control_command_id, SERVICE_EXEC_STOP, SERVICE_EXEC_STOP_POST))
return r;
}