public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: RHEL5 - [RGMANAGER] Resolves: #474444 - Zero-length pid files cause resource start failures
@ 2009-01-20 19:25 Marek Grác
0 siblings, 0 replies; only message in thread
From: Marek Grác @ 2009-01-20 19:25 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=c3b3dee1f1da733f431fcd4813afccd5ff2ea5a6
Commit: c3b3dee1f1da733f431fcd4813afccd5ff2ea5a6
Parent: 45670bac8a6ab989f03d20d423d297706877c477
Author: marx <marx@hroch.englab.brq.redhat.com>
AuthorDate: Tue Jan 20 20:17:06 2009 +0100
Committer: marx <marx@hroch.englab.brq.redhat.com>
CommitterDate: Tue Jan 20 20:19:20 2009 +0100
[RGMANAGER] Resolves: #474444 - Zero-length pid files cause resource start failures
---
rgmanager/src/resources/utils/config-utils.sh | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/resources/utils/config-utils.sh b/rgmanager/src/resources/utils/config-utils.sh
index fd79d6e..67049c7 100644
--- a/rgmanager/src/resources/utils/config-utils.sh
+++ b/rgmanager/src/resources/utils/config-utils.sh
@@ -289,6 +289,14 @@ check_pid_file() {
return 0;
fi
+ ## if PID file is empty then it should be safe to remove it
+ read pid < "$pid_file"
+ if [ -z "$pid" ]; then
+ rm $pid_file
+ ocf_log debug "PID File \"$pid_file\" Was Removed - Zero length";
+ return 0;
+ fi
+
if [ ! -d /proc/`cat "$pid_file"` ]; then
rm "$pid_file"
ocf_log debug "PID File \"$pid_file\" Was Removed - PID Does Not Exist";
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-20 19:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-20 19:25 cluster: RHEL5 - [RGMANAGER] Resolves: #474444 - Zero-length pid files cause resource start failures Marek Grác
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).