summaryrefslogtreecommitdiff
path: root/src/rc/rc-status.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-04-21 10:56:28 +0000
committerRoy Marples <roy@marples.name>2008-04-21 10:56:28 +0000
commit54d7aa39dd54ceaf7b7e509b3792bace9f34bad0 (patch)
treeca94ef0282dae7eec95cff79b26dbbde3dc390a2 /src/rc/rc-status.c
parentdc5d63aa9709f542e3a9cb7846f7a99cf60af0f6 (diff)
downloadopenrc-54d7aa39dd54ceaf7b7e509b3792bace9f34bad0.tar.gz
openrc-54d7aa39dd54ceaf7b7e509b3792bace9f34bad0.tar.bz2
openrc-54d7aa39dd54ceaf7b7e509b3792bace9f34bad0.tar.xz
If we don't have permission to inspect the pidfile, don't report crashed. Gentoo #218028.
Diffstat (limited to 'src/rc/rc-status.c')
-rw-r--r--src/rc/rc-status.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rc/rc-status.c b/src/rc/rc-status.c
index e4917c8..a64ab1b 100644
--- a/src/rc/rc-status.c
+++ b/src/rc/rc-status.c
@@ -103,9 +103,13 @@ static void print_service(const char *service)
snprintf(status, sizeof(status), "inactive ");
color = ECOLOR_WARN;
} else if (state & RC_SERVICE_STARTED) {
- if (test_crashed && rc_service_daemons_crashed(service))
+ errno = 0;
+ if (test_crashed &&
+ rc_service_daemons_crashed(service) &&
+ errno != EACCES)
+ {
snprintf(status, sizeof(status), " crashed ");
- else {
+ } else {
snprintf(status, sizeof(status), " started ");
color = ECOLOR_GOOD;
}