From mboxrd@z Thu Jan 1 00:00:00 1970 From: rohara@sourceware.org Date: 31 Aug 2006 17:49:17 -0000 Subject: [Cluster-devel] cluster/ccs/daemon ccsd.c Message-ID: <20060831174917.893.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: cluster Changes by: rohara at 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). Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/daemon/ccsd.c.diff?cvsroot=cluster&r1=1.25&r2=1.26 --- 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); + while(1){ unsigned int len = addr_size; @@ -755,7 +758,7 @@ } /* Make the parent stop waiting */ - kill(getppid(), SIGTERM); + /* kill(getppid(), SIGTERM); */ } signal(SIGINT, &sig_handler);