cluster/fence/fenced main.c
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
fence/fenced/main.c +2 -8
@@ -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 ); }