diff options
author | Christos Trochalakis <yatiohi@ideopolis.gr> | 2014-10-02 17:00:31 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2014-10-06 00:40:44 +0200 |
commit | 8f686fbeb1d3bc5ed2f4b3f5a5f79d17ab61c868 (patch) | |
tree | 1a301c9da54b22806f5852b84faf973d9f6cd2a9 /utils/start-stop-daemon.c | |
parent | e63048c680f151026237f2411e2bfebe2722f73d (diff) | |
download | dpkg-8f686fbeb1d3bc5ed2f4b3f5a5f79d17ab61c868.tar.gz |
s-s-d: Do not abort on --stop when only pid or ppid options are specified
When running with «--stop» and only pid or ppid as matching options,
start-stop-daemon aborts with a "no match option" error.
«pid» and «ppid» are proper matching options, so they should be enough
to proceed.
Missed in commits 80de58344cb38ab085ca2c7808f4f7b3be1d2422 and
3fabf94e0b5fe1bcdea26fecee1c87e74fab98b2.
Closes: #763767
Signed-off-by: Guillem Jover <guillem@debian.org>
Diffstat (limited to 'utils/start-stop-daemon.c')
-rw-r--r-- | utils/start-stop-daemon.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c index 706e90011..fd08b94f2 100644 --- a/utils/start-stop-daemon.c +++ b/utils/start-stop-daemon.c @@ -2041,6 +2041,10 @@ run_stop_schedule(void) set_what_stop(execname); else if (pidfile) sprintf(what_stop, "process in pidfile '%.200s'", pidfile); + else if (match_pid > 0) + sprintf(what_stop, "process with pid %d", match_pid); + else if (match_ppid > 0) + sprintf(what_stop, "process(es) with parent pid %d", match_ppid); else if (userspec) sprintf(what_stop, "process(es) owned by '%.200s'", userspec); else |