瀏覽代碼

s-s-d: Change do_stop() to always obey global quietmode

The only behaviour change was affecting the new do_stop_summary(), which
is not always called now after do_stop(), to catter for the forced quiet
mode when sending signal 0. The other verbose statement which before
commit 5fef90a2960053e9b24304e2a2663fb1ed7dafb1 was not being printed in
some cases, actually makes sense to print always.
Guillem Jover 15 年之前
父節點
當前提交
b15765a5b6
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      utils/start-stop-daemon.c

+ 4 - 4
utils/start-stop-daemon.c

@@ -1264,7 +1264,7 @@ do_findprocs(void)
 }
 
 static void
-do_stop(int sig_num, int quiet, int *n_killed, int *n_notkilled)
+do_stop(int sig_num, int *n_killed, int *n_notkilled)
 {
 	struct pid_list *p;
 
@@ -1354,7 +1354,7 @@ do_stop_timeout(int timeout, int *n_killed, int *n_notkilled)
 		if (timercmp(&before, &stopat, >))
 			return false;
 
-		do_stop(0, 1, n_killed, n_notkilled);
+		do_stop(0, n_killed, n_notkilled);
 		if (!*n_killed)
 			return true;
 
@@ -1427,7 +1427,7 @@ run_stop_schedule(void)
 	retry_nr = 0;
 
 	if (schedule == NULL) {
-		do_stop(signal_nr, quietmode, &n_killed, &n_notkilled);
+		do_stop(signal_nr, &n_killed, &n_notkilled);
 		do_stop_summary(0);
 		if (n_notkilled > 0 && quietmode <= 0)
 			printf("%d pids were not killed\n", n_notkilled);
@@ -1446,7 +1446,7 @@ run_stop_schedule(void)
 			position = value;
 			goto reposition;
 		case sched_signal:
-			do_stop(value, quietmode, &n_killed, &n_notkilled);
+			do_stop(value, &n_killed, &n_notkilled);
 			do_stop_summary(retry_nr++);
 			if (!n_killed)
 				return finish_stop_schedule(anykilled);