Steve Singer ssinger at ca.afilias.info
Thu Aug 5 08:55:43 PDT 2010
This can be considered part of bug 139 (non async safe functions being called
by a signal handler)
---
 src/slon/slon.c |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/slon/slon.c b/src/slon/slon.c
index 36eaf4a..837d709 100644
--- a/src/slon/slon.c
+++ b/src/slon/slon.c
@@ -793,7 +793,17 @@ SlonWatchdog(void)
 #endif
 	slon_log(SLON_INFO, "slon: watchdog process started\n");
 
-	/*
+
+
+	slon_log(SLON_CONFIG, "slon: watchdog ready - pid = %d\n", slon_watchdog_pid);
+
+	slon_worker_pid = fork();
+	if (slon_worker_pid == 0)
+	{
+		SlonMain();
+		exit(-1);
+	}
+		/*
 	 * Install signal handlers
 	 */
 #ifndef CYGWIN
@@ -841,15 +851,6 @@ SlonWatchdog(void)
 		slon_exit(-1);
 	}
 
-	slon_log(SLON_CONFIG, "slon: watchdog ready - pid = %d\n", slon_watchdog_pid);
-
-	slon_worker_pid = fork();
-	if (slon_worker_pid == 0)
-	{
-		SlonMain();
-		exit(-1);
-	}
-
 	slon_log(SLON_CONFIG, "slon: worker process created - pid = %d\n",
 			 slon_worker_pid);
 	while ((pid = wait(&child_status)) != slon_worker_pid)
-- 
1.6.3.3


--------------000606050901080609030803
Content-Type: text/x-patch;
 name="0003-If-the-nodelock-can-not-be-obtained-then-the-worker-.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename*0="0003-If-the-nodelock-can-not-be-obtained-then-the-worker-.pa";
 filename*1="tch"



More information about the Slony1-patches mailing list