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

[Cluster-devel] cluster/fence/fenced main.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL50
Changes by:	lhh sourceware org	2006-11-30 23:58:05

Modified files:
	fence/fenced   : main.c 

Log message:
	Fix bug where fence agents were getting info up to groupd

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fenced/main.c.diff?cvsroot=cluster&only_with_tag=RHEL50&r1=1.38&r2=1.38.4.1

--- cluster/fence/fenced/main.c	2006/10/13 16:03:47	1.38
+++ cluster/fence/fenced/main.c	2006/11/30 23:58:05	1.38.4.1
@@ -583,19 +583,13 @@
 	client_init();
 
 	if (!daemon_debug_opt) {
-		pid_t pid = fork();
-		if (pid < 0) {
+		if (daemon(0,0) < 0) {
 			perror("main: cannot fork");
 			exit(EXIT_FAILURE);
 		}
-		if (pid)
-			exit(EXIT_SUCCESS);
-		setsid();
+		
 		chdir("/");
 		umask(0);
-		close(0);
-		close(1);
-		close(2);
 		openlog("fenced", LOG_PID, LOG_DAEMON);
 	}
 


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