Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/openrc:0.34.x commit in: src/rc/
Date: Mon, 20 Nov 2017 17:56:24
Message-Id: 1511200546.1732c70fb5e6d75c0d104662d06169978c00a5e8.williamh@OpenRC
1 commit: 1732c70fb5e6d75c0d104662d06169978c00a5e8
2 Author: Doug Freed <dwfreed <AT> mtu <DOT> edu>
3 AuthorDate: Sun Nov 19 16:05:30 2017 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 20 17:55:46 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=1732c70f
7
8 rc-schedules: if given nothing to look for, stop
9
10 This avoids trying to kill everything.
11
12 X-Gentoo-Bug: 631958
13 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=631958
14
15 src/rc/rc-schedules.c | 3 +++
16 1 file changed, 3 insertions(+)
17
18 diff --git a/src/rc/rc-schedules.c b/src/rc/rc-schedules.c
19 index d60c2822..8f36f073 100644
20 --- a/src/rc/rc-schedules.c
21 +++ b/src/rc/rc-schedules.c
22 @@ -307,6 +307,9 @@ int run_stop_schedule(const char *applet,
23 const char *const *p;
24 bool progressed = false;
25
26 + if (!(pid > 0 || exec || uid || (argv && *argv)))
27 + return 0;
28 +
29 if (exec)
30 einfov("Will stop %s", exec);
31 if (pid > 0)