[Cluster-devel] cluster/fence/fenced main.c
lhh at sourceware.org
lhh at sourceware.org
Thu Nov 30 23:56:04 UTC 2006
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: lhh at sourceware.org 2006-11-30 23:56:03
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&r1=1.38&r2=1.39
--- cluster/fence/fenced/main.c 2006/10/13 16:03:47 1.38
+++ cluster/fence/fenced/main.c 2006/11/30 23:56:03 1.39
@@ -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);
}
More information about the Cluster-devel
mailing list