summaryrefslogtreecommitdiff
path: root/src/core/busname.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-10-27 18:09:32 +0100
committerTom Gundersen <teg@jklm.no>2015-10-27 18:09:32 +0100
commitdc1e811ebd80d1659d1476c4ae733d212d6aa946 (patch)
treeee28d0fef1577fdc73e723717a83db225406ce8b /src/core/busname.c
parent64529a2921a8972878b3f953935f286ce77914e0 (diff)
parent930d2838f206d725d890c78475312910cd16329a (diff)
Merge pull request #1698 from poettering/pid-is-unwaited-fix
fixup for previous pr
Diffstat (limited to 'src/core/busname.c')
-rw-r--r--src/core/busname.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/busname.c b/src/core/busname.c
index 3592f72fe5..68508e20d2 100644
--- a/src/core/busname.c
+++ b/src/core/busname.c
@@ -364,10 +364,9 @@ static int busname_coldplug(Unit *u) {
if (n->deserialized_state == n->state)
return 0;
- if (IN_SET(n->deserialized_state, BUSNAME_MAKING, BUSNAME_SIGTERM, BUSNAME_SIGKILL)) {
-
- if (n->control_pid <= 0)
- return -EBADMSG;
+ if (n->control_pid > 0 &&
+ pid_is_unwaited(n->control_pid) &&
+ IN_SET(n->deserialized_state, BUSNAME_MAKING, BUSNAME_SIGTERM, BUSNAME_SIGKILL)) {
r = unit_watch_pid(UNIT(n), n->control_pid);
if (r < 0)