mirror of
https://github.com/troglobit/finit.git
synced 2026-10-08 00:24:17 +07:00
Merge pull request #233 from liuming50/fix-a-return-value-of-initctl-status
initctl: fix return status of run tasks Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+9
-2
@@ -791,8 +791,15 @@ static int show_status(char *arg)
|
||||
if (!svc)
|
||||
return 255;
|
||||
|
||||
if (quiet)
|
||||
return svc->state != SVC_RUNNING_STATE;
|
||||
if (quiet) {
|
||||
if (svc_is_runtask(svc))
|
||||
if (svc->started)
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
else
|
||||
return svc->state != SVC_RUNNING_STATE;
|
||||
}
|
||||
|
||||
pidfn = svc->pidfile;
|
||||
if (pidfn[0] == '!')
|
||||
|
||||
Reference in New Issue
Block a user