summaryrefslogtreecommitdiff
path: root/src/rc/runscript.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-03-21 17:41:01 +0000
committerRoy Marples <roy@marples.name>2008-03-21 17:41:01 +0000
commitf7f3b6ae093106e0f86556d1424af30e2122192a (patch)
treea3db29faadd4e630d6d6ba90ad486f8d6b8d45f1 /src/rc/runscript.c
parentf6b47568ad9a103c5c84d9e9005a51be87273026 (diff)
downloadopenrc-f7f3b6ae093106e0f86556d1424af30e2122192a.tar.gz
openrc-f7f3b6ae093106e0f86556d1424af30e2122192a.tar.bz2
openrc-f7f3b6ae093106e0f86556d1424af30e2122192a.tar.xz
euid 0 should always be able to find pids too.
Diffstat (limited to 'src/rc/runscript.c')
-rw-r--r--src/rc/runscript.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rc/runscript.c b/src/rc/runscript.c
index 9263cea..d450004 100644
--- a/src/rc/runscript.c
+++ b/src/rc/runscript.c
@@ -559,8 +559,10 @@ static RC_SERVICE svc_status(void)
snprintf(status, sizeof(status), "inactive");
e = &ewarn;
} else if (state & RC_SERVICE_STARTED) {
- if (_rc_findpid1() && rc_service_daemons_crashed(service)) {
- snprintf(status, sizeof (status), "crashed");
+ if (_rc_can_find_pids() &&
+ rc_service_daemons_crashed(service))
+ {
+ snprintf(status, sizeof(status), "crashed");
e = &eerror;
} else
snprintf(status, sizeof(status), "started");