[WIN32] Raise SIGTERM from the ShutdownRequestThread to emulate
[catagits/fcgi2.git] / libfcgi / os_win32.c
index a0309b8..d2ff0f5 100755 (executable)
@@ -17,7 +17,7 @@
  *  significantly more enjoyable.)
  */
 #ifndef lint
-static const char rcsid[] = "$Id: os_win32.c,v 1.34 2003/06/22 00:16:43 robs Exp $";
+static const char rcsid[] = "$Id: os_win32.c,v 1.35 2004/01/31 17:47:07 robs Exp $";
 #endif /* not lint */
 
 #define WIN32_LEAN_AND_MEAN 
@@ -28,6 +28,7 @@ static const char rcsid[] = "$Id: os_win32.c,v 1.34 2003/06/22 00:16:43 robs Exp
 #include <stdio.h>
 #include <sys/timeb.h>
 #include <process.h>
+#include <signal.h>
 
 #define DLLAPI  __declspec(dllexport)
 
@@ -277,6 +278,9 @@ static void ShutdownRequestThread(void * arg)
 
     shutdownPending = TRUE;
 
+    // emulate the unix behaviour
+    raise(SIGTERM);
+
     if (listenType == FD_PIPE_SYNC)
     {
         // Its a hassle to get ConnectNamedPipe to return early,