aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-08-08 03:07:09 +0000
committerRoy Marples <roy@marples.name>2007-08-08 03:07:09 +0000
commit30853d7473a502248c87f0a743090df8d7d6a81f (patch)
treea36640972b383813fb23ee5d2cf639e3ca88af88
parentce12aa56d4988dbcb31636d6124f3ad0fc27ba8c (diff)
If given a pidfile, just match on that for seeing if we have crashed
or not, #186159.
-rw-r--r--ChangeLog5
-rw-r--r--src/librc-daemon.c21
2 files changed, 13 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 5a42bdea..ef4ce867 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for Gentoo System Intialization ("rc") scripts
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPLv2
+ 08 Aug 2007; Roy Marples <uberlord@gentoo.org>:
+
+ If given a pidfile, just match on that for seeing if we have crashed
+ or not, #186159.
+
* baselayout-2.0.0_rc2 (04 Aug 2007)
04 Aug 2007; Roy Marples <uberlord@gentoo.org>:
diff --git a/src/librc-daemon.c b/src/librc-daemon.c
index b59460dd..9e3ea488 100644
--- a/src/librc-daemon.c
+++ b/src/librc-daemon.c
@@ -515,6 +515,12 @@ bool rc_service_daemons_crashed (const char *service)
fclose (fp);
free (pidfile);
pidfile = NULL;
+
+ /* We have the pid, so no need to match on name */
+ free (exec);
+ exec = NULL;
+ free (name);
+ name = NULL;
}
if ((pids = rc_find_pids (exec, name, 0, pid)) == NULL) {
@@ -523,25 +529,14 @@ bool rc_service_daemons_crashed (const char *service)
}
free (pids);
- if (exec) {
- free (exec);
- exec = NULL;
- }
- if (name) {
- free (name);
- name = NULL;
- }
- }
-
- if (exec) {
free (exec);
exec = NULL;
- }
- if (name) {
free (name);
name = NULL;
}
+ free (exec);
+ free (name);
free (dirpath);
rc_strlist_free (files);