[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/fence/fence_tool fence_tool.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	jparsons sourceware org	2006-10-23 16:23:56

Modified files:
	fence/fence_tool: fence_tool.c 

Log message:
	This fixes bz 203804, wherein pid files are left around. Thx jlayton.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fence_tool/fence_tool.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.5.2.12&r2=1.5.2.13

--- cluster/fence/fence_tool/fence_tool.c	2006/02/09 15:25:11	1.5.2.12
+++ cluster/fence/fence_tool/fence_tool.c	2006/10/23 16:23:56	1.5.2.13
@@ -357,7 +357,7 @@
 {
 	FILE *f;
 	char buf[33] = "";
-	int pid = 0;
+	int pid = 0, error;
 
 	lockfile();
 
@@ -379,7 +379,10 @@
 	close(cl_sock);
 
 	kill(pid, SIGTERM);
-
+	error = unlink(LOCKFILE_NAME);
+	if (error)
+		die("signal sent, but unable to unlink %s: %s", LOCKFILE_NAME,
+			strerror(error)); 
 	return EXIT_SUCCESS;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]