aboutsummaryrefslogtreecommitdiff
path: root/src/rc/rc-schedules.c
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2017-09-06 16:43:28 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2017-09-06 17:22:35 -0500
commit382efdbfcb99703d03211efacd800c9575e64230 (patch)
tree028850d6071496eb881da6ef51e8013b3ab7548c /src/rc/rc-schedules.c
parent17b5cc78d35dc5fe4904e5951715c3e0d07d6343 (diff)
add quiet parameter to run_stop_schedule
Diffstat (limited to 'src/rc/rc-schedules.c')
-rw-r--r--src/rc/rc-schedules.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/rc/rc-schedules.c b/src/rc/rc-schedules.c
index 7eb28372..1b235a8d 100644
--- a/src/rc/rc-schedules.c
+++ b/src/rc/rc-schedules.c
@@ -298,7 +298,7 @@ int do_stop(const char *applet, const char *exec, const char *const *argv,
int run_stop_schedule(const char *applet,
const char *exec, const char *const *argv,
pid_t pid, uid_t uid,
- bool test, bool progress)
+ bool test, bool progress, bool quiet)
{
SCHEDULEITEM *item = TAILQ_FIRST(&schedule);
int nkilled = 0;
@@ -409,10 +409,11 @@ int run_stop_schedule(const char *applet,
if (progressed)
printf("\n");
- if (nrunning == 1)
- eerror("%s: %d process refused to stop", applet, nrunning);
- else
- eerror("%s: %d process(es) refused to stop", applet, nrunning);
+ if (! quiet)
+ if (nrunning == 1)
+ eerror("%s: %d process refused to stop", applet, nrunning);
+ else
+ eerror("%s: %d process(es) refused to stop", applet, nrunning);
return -nrunning;
}