Browse Source

Using FCGIlib OS_IpcClose and increase monitor watchdog timeout

Yann Weber 3 years ago
parent
commit
8e452c4087
3 changed files with 4 additions and 1 deletions
  1. 2
    0
      include/responder.h
  2. 1
    1
      src/monitor.c
  3. 1
    0
      src/responder.c

+ 2
- 0
include/responder.h View File

@@ -42,6 +42,8 @@
42 42
 #include "config.h"
43 43
 
44 44
 #include <fcgiapp.h> /* fcgi library; put it first*/
45
+//#include <fcgios.h> /* OS_IpcClose() but includes fcgi_config.h... */
46
+extern int OS_IpcClose(int ipcFd);
45 47
 
46 48
 #include <stdlib.h>
47 49
 #include <unistd.h>

+ 1
- 1
src/monitor.c View File

@@ -43,7 +43,7 @@ pid_t pyfcgi_spawn_monitor()
43 43
 	struct timespec wd_delay;
44 44
 	int err;
45 45
 
46
-	wd_delay.tv_sec = 1;
46
+	wd_delay.tv_sec = 2;
47 47
 	wd_delay.tv_nsec = 0;
48 48
 
49 49
 	act.sa_handler = pyfcgi_monitor_sighandler;

+ 1
- 0
src/responder.c View File

@@ -26,6 +26,7 @@ static void clean_exit(int status)
26 26
 	{
27 27
 		kill(PyFCGI_conf.context.pid, SIGTERM);
28 28
 	}
29
+	OS_IpcClose(PyFCGI_conf.context.fcgi_socket);
29 30
 	pyfcgi_IPC_close(IPC_WSTATE | IPC_WREQS | IPC_SEMST | IPC_SHMST);
30 31
 	pyfcgi_IPC_destroy(IPC_WSTATE | IPC_WREQS | IPC_SEMST | IPC_SHMST);
31 32
 	exit(status);

Loading…
Cancel
Save