public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE2 - [RGMANAGER] Resolves: #474444 - Zero-length pid files cause resource start failures
@ 2009-01-20 20:40 Marek Grác
0 siblings, 0 replies; only message in thread
From: Marek Grác @ 2009-01-20 20:40 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=73e6c9292ea4eb8808a4ac5b8090c383b6e88ec2
Commit: 73e6c9292ea4eb8808a4ac5b8090c383b6e88ec2
Parent: d0bc69ba94169486d96595ab73c2cddaa018fd0b
Author: marx <marx@hroch.englab.brq.redhat.com>
AuthorDate: Tue Jan 20 20:17:06 2009 +0100
Committer: Marek 'marx' Grac <mgrac@redhat.com>
CommitterDate: Tue Jan 20 20:50:58 2009 +0100
[RGMANAGER] Resolves: #474444 - Zero-length pid files cause resource start failures
---
rgmanager/src/resources/utils/config-utils.sh.in | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/resources/utils/config-utils.sh.in b/rgmanager/src/resources/utils/config-utils.sh.in
index 76355fa..440569d 100644
--- a/rgmanager/src/resources/utils/config-utils.sh.in
+++ b/rgmanager/src/resources/utils/config-utils.sh.in
@@ -270,6 +270,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 20:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-20 20:40 cluster: STABLE2 - [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).