aboutsummaryrefslogtreecommitdiff
path: root/src/rc
diff options
context:
space:
mode:
authorDoug Freed <dwfreed@mtu.edu>2017-11-19 11:05:30 -0500
committerDoug Freed <dwfreed@mtu.edu>2017-11-19 11:05:30 -0500
commita192caf88f527e09508e32baa623ef85549612ae (patch)
tree867d7c6e717dce8ac7ae3b12810fd0bedb035db5 /src/rc
parente805c74d31113c75058d860588e83bca120decf6 (diff)
rc-schedules: if given nothing to look for, stop
This avoids trying to kill everything. X-Gentoo-Bug: 631958 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=631958
Diffstat (limited to 'src/rc')
-rw-r--r--src/rc/rc-schedules.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rc/rc-schedules.c b/src/rc/rc-schedules.c
index d60c2822..8f36f073 100644
--- a/src/rc/rc-schedules.c
+++ b/src/rc/rc-schedules.c
@@ -307,6 +307,9 @@ int run_stop_schedule(const char *applet,
const char *const *p;
bool progressed = false;
+ if (!(pid > 0 || exec || uid || (argv && *argv)))
+ return 0;
+
if (exec)
einfov("Will stop %s", exec);
if (pid > 0)