If given a pidfile, just match on that for seeing if we have crashed

or not, #186159.
This commit is contained in:
Roy Marples 2007-08-08 03:07:09 +00:00
parent ce12aa56d4
commit 30853d7473
2 changed files with 13 additions and 13 deletions

View File

@ -1,6 +1,11 @@
# ChangeLog for Gentoo System Intialization ("rc") scripts # ChangeLog for Gentoo System Intialization ("rc") scripts
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPLv2 # 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) * baselayout-2.0.0_rc2 (04 Aug 2007)
04 Aug 2007; Roy Marples <uberlord@gentoo.org>: 04 Aug 2007; Roy Marples <uberlord@gentoo.org>:

View File

@ -515,6 +515,12 @@ bool rc_service_daemons_crashed (const char *service)
fclose (fp); fclose (fp);
free (pidfile); free (pidfile);
pidfile = NULL; 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) { if ((pids = rc_find_pids (exec, name, 0, pid)) == NULL) {
@ -523,25 +529,14 @@ bool rc_service_daemons_crashed (const char *service)
} }
free (pids); free (pids);
if (exec) {
free (exec);
exec = NULL;
}
if (name) {
free (name);
name = NULL;
}
}
if (exec) {
free (exec); free (exec);
exec = NULL; exec = NULL;
}
if (name) {
free (name); free (name);
name = NULL; name = NULL;
} }
free (exec);
free (name);
free (dirpath); free (dirpath);
rc_strlist_free (files); rc_strlist_free (files);