aboutsummaryrefslogtreecommitdiff
path: root/src/start-stop-daemon.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-11-14 14:04:34 +0000
committerRoy Marples <roy@marples.name>2007-11-14 14:04:34 +0000
commit28d9d86dd54c530c19141de3adf139e200f4da01 (patch)
tree30fd0b21d2fb40015d85189ff9ac0a2234b0127d /src/start-stop-daemon.c
parentf8ad30fc6e35c171bf62e880aa2e4249e64d1d9f (diff)
We should always give eend a message.
Diffstat (limited to 'src/start-stop-daemon.c')
-rw-r--r--src/start-stop-daemon.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/start-stop-daemon.c b/src/start-stop-daemon.c
index 6bdf145a..83ec0387 100644
--- a/src/start-stop-daemon.c
+++ b/src/start-stop-daemon.c
@@ -314,16 +314,12 @@ static int do_stop (const char *exec, const char *cmd,
ebegin ("Sending signal %d to PID %d", sig, pids[i]);
errno = 0;
killed = (kill (pids[i], sig) == 0 || errno == ESRCH ? true : false);
+ if (verbose)
+ eend (killed ? 0 : 1, "%s: failed to send signal %d to PID %d: %s",
+ applet, sig, pids[i], strerror (errno));
if (! killed) {
- if (! quiet)
- eerror ("%s: failed to send signal %d to PID %d: %s",
- applet, sig, pids[i], strerror (errno));
- if (verbose)
- eend (1, NULL);
nkilled = -1;
} else {
- if (verbose)
- eend (0, NULL);
if (nkilled != -1)
nkilled++;
}