* [gentoo-commits] proj/openrc:openrc-0.12.x commit in: src/rc/
@ 2013-10-08 17:10 William Hubbs
  0 siblings, 0 replies; 2+ messages in thread
From: William Hubbs @ 2013-10-08 17:10 UTC (permalink / raw
  To: gentoo-commits
commit:     5b4886d23e33dda68623def2d59745fd72ac4c53
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Mon Sep 30 21:55:25 2013 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Oct  8 17:06:09 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=5b4886d2
start-stop-daemon: fix eerorr calls in get_pid
The eerror calls in this function make it too verbose, so change them to
ewarnv() calls instead. This means that they will only print if the
--verbose option is used or EINFO_VERBOSE=yes is set in the environment.
---
 src/rc/start-stop-daemon.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c
index 5576d49..0813eff 100644
--- a/src/rc/start-stop-daemon.c
+++ b/src/rc/start-stop-daemon.c
@@ -316,14 +316,12 @@ get_pid(const char *pidfile, bool quiet)
 		return -1;
 
 	if ((fp = fopen(pidfile, "r")) == NULL) {
-		if (!quiet)
-			eerror("%s: fopen `%s': %s", applet, pidfile, strerror(errno));
+		ewarnv("%s: fopen `%s': %s", applet, pidfile, strerror(errno));
 		return -1;
 	}
 
 	if (fscanf(fp, "%d", &pid) != 1) {
-		if (!quiet)
-			eerror("%s: no pid found in `%s'", applet, pidfile);
+		ewarnv("%s: no pid found in `%s'", applet, pidfile);
 		fclose(fp);
 		return -1;
 	}
^ permalink raw reply related	[flat|nested] 2+ messages in thread* [gentoo-commits] proj/openrc:openrc-0.12.x commit in: src/rc/
@ 2013-10-08 17:10 William Hubbs
  0 siblings, 0 replies; 2+ messages in thread
From: William Hubbs @ 2013-10-08 17:10 UTC (permalink / raw
  To: gentoo-commits
commit:     b1de9d732458708248e1c69d31126e9afbd366a4
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Sat Oct  5 22:19:06 2013 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Oct  8 17:06:09 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=b1de9d73
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.
Conflicts:
	src/rc/start-stop-daemon.c
---
 src/rc/start-stop-daemon.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c
index 0813eff..91696e3 100644
--- a/src/rc/start-stop-daemon.c
+++ b/src/rc/start-stop-daemon.c
@@ -459,7 +459,7 @@ run_stop_schedule(const char *exec, const char *const *argv,
 				{
 					if ((nrunning = do_stop(exec, argv,
 						    pid, uid, 0, true, false,
-						    true)) == 0)
+	test)) == 0)
 						return 0;
 
 
@@ -1086,7 +1086,7 @@ start_stop_daemon(int argc, char **argv)
 		pid = 0;
 
 	if (do_stop(exec, (const char * const *)margv, pid, uid,
-		0, true, false, true) > 0)
+		0, true, false, test) > 0)
 		eerrorx("%s: %s is already running", applet, exec);
 
 	if (test) {
@@ -1364,7 +1364,7 @@ start_stop_daemon(int argc, char **argv)
 			} else
 				pid = 0;
 			if (do_stop(exec, (const char *const *)margv,
-				pid, uid, 0, true, false, true) > 0)
+				pid, uid, 0, true, false, test) > 0)
 				alive = true;
 		}
 
^ permalink raw reply related	[flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-08 17:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-08 17:10 [gentoo-commits] proj/openrc:openrc-0.12.x commit in: src/rc/ William Hubbs
  -- strict thread matches above, loose matches on Subject: below --
2013-10-08 17:10 William Hubbs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox