Using FCGIlib OS_IpcClose and increase monitor watchdog timeout

This commit is contained in:
Yann Weber 2021-01-24 11:26:38 +01:00
commit 8e452c4087
3 changed files with 4 additions and 1 deletions

View file

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

View file

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

View file

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