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
 #include "config.h"
42
 #include "config.h"
43
 
43
 
44
 #include <fcgiapp.h> /* fcgi library; put it first*/
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
 #include <stdlib.h>
48
 #include <stdlib.h>
47
 #include <unistd.h>
49
 #include <unistd.h>

+ 1
- 1
src/monitor.c View File

43
 	struct timespec wd_delay;
43
 	struct timespec wd_delay;
44
 	int err;
44
 	int err;
45
 
45
 
46
-	wd_delay.tv_sec = 1;
46
+	wd_delay.tv_sec = 2;
47
 	wd_delay.tv_nsec = 0;
47
 	wd_delay.tv_nsec = 0;
48
 
48
 
49
 	act.sa_handler = pyfcgi_monitor_sighandler;
49
 	act.sa_handler = pyfcgi_monitor_sighandler;

+ 1
- 0
src/responder.c View File

26
 	{
26
 	{
27
 		kill(PyFCGI_conf.context.pid, SIGTERM);
27
 		kill(PyFCGI_conf.context.pid, SIGTERM);
28
 	}
28
 	}
29
+	OS_IpcClose(PyFCGI_conf.context.fcgi_socket);
29
 	pyfcgi_IPC_close(IPC_WSTATE | IPC_WREQS | IPC_SEMST | IPC_SHMST);
30
 	pyfcgi_IPC_close(IPC_WSTATE | IPC_WREQS | IPC_SEMST | IPC_SHMST);
30
 	pyfcgi_IPC_destroy(IPC_WSTATE | IPC_WREQS | IPC_SEMST | IPC_SHMST);
31
 	pyfcgi_IPC_destroy(IPC_WSTATE | IPC_WREQS | IPC_SEMST | IPC_SHMST);
31
 	exit(status);
32
 	exit(status);

Loading…
Cancel
Save