1 |
commit: a192caf88f527e09508e32baa623ef85549612ae |
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: Sun Nov 19 16:05:30 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=a192caf8 |
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) |