Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/
Date: Mon, 03 Apr 2017 15:45:18
Message-Id: 1491234220.9eb669591e16c5ee0ca07babe058d0b7b2396077.williamh@OpenRC
1 commit: 9eb669591e16c5ee0ca07babe058d0b7b2396077
2 Author: Austin English <austinenglish <AT> gmail <DOT> com>
3 AuthorDate: Fri Mar 31 18:59:38 2017 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 3 15:43:40 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=9eb66959
7
8 start-stop-daemon: warn if calling --start with --retry or --stop with --wait
9
10 This fixes #122
11
12 src/rc/start-stop-daemon.c | 7 +++++++
13 1 file changed, 7 insertions(+)
14
15 diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c
16 index e9f9848c..c88bc962 100644
17 --- a/src/rc/start-stop-daemon.c
18 +++ b/src/rc/start-stop-daemon.c
19 @@ -960,6 +960,9 @@ int main(int argc, char **argv)
20 if (redirect_stdout || redirect_stderr)
21 eerrorx("%s: --stdout and --stderr are only relevant"
22 " with --start", applet);
23 + if (start_wait)
24 + ewarn("using --wait with --stop has no effect,"
25 + " use --retry instead");
26 } else {
27 if (!exec)
28 eerrorx("%s: nothing to start", applet);
29 @@ -1012,7 +1015,11 @@ int main(int argc, char **argv)
30 eerror("%s: %s does not exist", applet,
31 *exec_file ? exec_file : exec);
32 exit(EXIT_FAILURE);
33 +
34 }
35 + if (start && retry)
36 + ewarn("using --retry with --start has no effect,"
37 + " use --wait instead");
38
39 /* If we don't have a pidfile we should check if it's interpreted
40 * or not. If it we, we need to pass the interpreter through