From 639d6cfde544af38aeff62fe6507873c76254457 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 24 Feb 2010 21:37:57 +0000 Subject: [PATCH] Monotone-Parent: a6d78867a3dc3aa8d263e0a0a3afd0a15307c907 Monotone-Revision: 776dc75fed5683da1627715f48714600978e0286 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-02-24T21:37:57 Monotone-Branch: ca.inverse.sogo --- SOPE/sope-patchset-r1664.diff | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/SOPE/sope-patchset-r1664.diff b/SOPE/sope-patchset-r1664.diff index 7f21f76f9..ef687e751 100644 --- a/SOPE/sope-patchset-r1664.diff +++ b/SOPE/sope-patchset-r1664.diff @@ -5436,7 +5436,7 @@ Index: sope-appserver/NGObjWeb/WOWatchDogApplicationMain.m #if defined(__CYGWIN32__) || defined(__MINGW32__) int WOWatchDogApplicationMain -@@ -39,201 +60,875 @@ +@@ -39,201 +60,876 @@ #include #include @@ -6023,6 +6023,7 @@ Index: sope-appserver/NGObjWeb/WOWatchDogApplicationMain.m + [self logWithFormat: @"child spawned with pid %d", childPid]; + [child setPid: childPid]; + [child setStatus: WOChildStatusSpawning]; ++ [pair[1] setReceiveTimeout: 1.0]; + [child setControlSocket: pair[1]]; + [child setLastSpawn: [NSCalendarDate date]]; + } else { @@ -6473,7 +6474,7 @@ Index: sope-appserver/NGObjWeb/WOWatchDogApplicationMain.m #if LIB_FOUNDATION_LIBRARY || defined(GS_PASS_ARGUMENTS) { extern char **environ; -@@ -241,179 +936,59 @@ +@@ -241,179 +937,59 @@ environment:(void*)environ]; } #endif @@ -6701,7 +6702,7 @@ Index: sope-appserver/NGObjWeb/WOWatchDogApplicationMain.m } #endif -@@ -421,8 +996,8 @@ +@@ -421,8 +997,8 @@ @interface NSUserDefaults(ServerDefaults) + (id)hackInServerDefaults:(NSUserDefaults *)_ud @@ -6712,7 +6713,7 @@ Index: sope-appserver/NGObjWeb/WOWatchDogApplicationMain.m @end int WOWatchDogApplicationMainWithServerDefaults -@@ -437,7 +1012,7 @@ +@@ -437,7 +1013,7 @@ { extern char **environ; [NSProcessInfo initializeWithArguments:(void*)argv count:argc @@ -6721,7 +6722,7 @@ Index: sope-appserver/NGObjWeb/WOWatchDogApplicationMain.m } #endif -@@ -446,8 +1021,8 @@ +@@ -446,8 +1022,8 @@ ud = [NSUserDefaults standardUserDefaults]; sd = [defClass hackInServerDefaults:ud @@ -6954,7 +6955,14 @@ Index: sope-appserver/NGObjWeb/ChangeLog =================================================================== --- sope-appserver/NGObjWeb/ChangeLog (revision 1664) +++ sope-appserver/NGObjWeb/ChangeLog (working copy) -@@ -1,3 +1,177 @@ +@@ -1,3 +1,184 @@ ++2010-02-24 Wolfgang Sourdeau ++ ++ * WOWatchDogApplicationMain.m (_spawnChild:): we set a timeout of ++ 1 second to the parent-side child control socket to avoid hang on ++ status reads when the child dies before the message reaches the ++ parent. ++ +2010-02-18 Wolfgang Sourdeau + + * WOWatchDogApplicationMain.m (-run:argc:argv:): we assign the