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

[Cluster-devel] cluster/ccs/daemon ccsd.c

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	rohara sourceware org	2006-08-31 17:49:16

Modified files:
	ccs/daemon     : ccsd.c 

Log message:
	Moved code which signals parent (SIGTERM), which allows the parent process
	to continue and exit. This signal was occuring before ccsd had the sockets
	ready for communication, and as a result the cman init script would sometimes
	fail because the ccsd would daemonize before the socket was ready.
	This fix will not signal the parent until ccsd is ready (socket is created
	and ready; before select() loop).


--- cluster/ccs/daemon/ccsd.c	2006/08/30 17:35:40	1.25
+++ cluster/ccs/daemon/ccsd.c	2006/08/31 17:49:16	1.26
@@ -181,6 +181,9 @@
   if (sfds[2] >= 0) 
     FD_SET(sfds[2], &rset);
+  log_dbg("Sending SIGTERM to parent\n");
+  kill(getppid(), SIGTERM);
     unsigned int len = addr_size;
@@ -755,7 +758,7 @@
     /* Make the parent stop waiting */
-    kill(getppid(), SIGTERM);
+    /* kill(getppid(), SIGTERM); */
   signal(SIGINT, &sig_handler);

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