Re: FCGI_FAIL_ACCEPT_ON_INTR
"Emil A Eklund" <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <007601c71925$b0d67ec0$0601a8c0@eaenet> |
What platform are you using? It should work out of the box under Unix, however as FCGI_FAIL_ACCEPT_ON_INTR is not supported under windows in the official devel package a patch is required. I have one I made a few years ago laying around somewhere. I'll try to find it. -- Emil A Eklund ----- Original Message ----- From: "Richard Levenberg" <[email protected]> To: <fastcgi-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org> Sent: Tuesday, December 05, 2006 07:33 Subject: [FASTCGI] FCGI_FAIL_ACCEPT_ON_INTR 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/ ___________________________________ fastcgi-developers mailing list http://fastcgi.com/fastcgi-developers/