Only test crashed services if we can see pid 1.

This commit is contained in:
Roy Marples
2008-03-21 13:04:29 +00:00
parent 4079b4d65d
commit 85a6addd23
3 changed files with 35 additions and 4 deletions

View File

@ -559,7 +559,7 @@ static RC_SERVICE svc_status(void)
snprintf(status, sizeof(status), "inactive");
e = &ewarn;
} else if (state & RC_SERVICE_STARTED) {
if (rc_service_daemons_crashed(service)) {
if (_rc_findpid1() && rc_service_daemons_crashed(service)) {
snprintf(status, sizeof (status), "crashed");
e = &eerror;
} else