FCGI_FAIL_ACCEPT_ON_INTR
Richard Levenberg <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
I'm not exactly sure what this setting is supposed to do? My code looks
like this:
listen_socket = FCGX_OpenSocket(":9000", 100);
FCGX_Init();
FCGX_InitRequest(&request, listen_socket, 0 /* FCGI_FAIL_ACCEPT_ON_INTR */);
sig_int_flag = 0;
while ((sig_int_flag == 0) && (FCGX_Accept_r(&request) >= 0)) {
char *content_type;
FCGX_FPrintF(request.out, "Content-type: %s\r\n\r\n", content_type);
/* do other stuff */
FCGX_Finish_r(&request);
}
/* clean up code starts here */
....
I have a signal handler that catches SIGTERM and sets sig_int_flag to 1.
Regardless of whether I use the FCGI_FAIL_ACCEPT_ON_INTR setting or not,
the signal is caught but it never breaks out of the loop and executes
the cleanup code. What I want to do is have the loop exit and run the
cleanup code but I am not sure how to do that with or without the
FCGI_FAIL_ACCEPT_ON_INTR setting.
r
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/