start-stop-daemon: fix do_stop calls
Several calls to do_stop were forcing the test parameter to be true, which was causing extra output to the terminal, such as: * Would send signal 0 to pid xxxxx This should only happen if the --test command line option was used.
This commit is contained in:
parent
e6df76a377
commit
82378bd92d
@ -452,7 +452,7 @@ run_stop_schedule(const char *exec, const char *const *argv,
|
|||||||
nloops++)
|
nloops++)
|
||||||
{
|
{
|
||||||
if ((nrunning = do_stop(exec, argv,
|
if ((nrunning = do_stop(exec, argv,
|
||||||
pid, uid, 0, true)) == 0)
|
pid, uid, 0, test)) == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
||||||
@ -1075,7 +1075,7 @@ start_stop_daemon(int argc, char **argv)
|
|||||||
pid = 0;
|
pid = 0;
|
||||||
|
|
||||||
if (do_stop(exec, (const char * const *)margv, pid, uid,
|
if (do_stop(exec, (const char * const *)margv, pid, uid,
|
||||||
0, true) > 0)
|
0, test) > 0)
|
||||||
eerrorx("%s: %s is already running", applet, exec);
|
eerrorx("%s: %s is already running", applet, exec);
|
||||||
|
|
||||||
if (test) {
|
if (test) {
|
||||||
@ -1352,7 +1352,7 @@ start_stop_daemon(int argc, char **argv)
|
|||||||
} else
|
} else
|
||||||
pid = 0;
|
pid = 0;
|
||||||
if (do_stop(exec, (const char *const *)margv,
|
if (do_stop(exec, (const char *const *)margv,
|
||||||
pid, uid, 0, true) > 0)
|
pid, uid, 0, test) > 0)
|
||||||
alive = true;
|
alive = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user