diff options
| -rw-r--r-- | sapi/cgi/cgi_main.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 09379d12ba..bf8ba280b3 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -61,6 +61,10 @@ #include <syslog.h> #endif +#if HAVE_SIGNAL_H +#include <signal.h> +#endif + #include "zend_compile.h" #include "zend_execute.h" #include "zend_highlight.h" @@ -334,6 +338,13 @@ int main(int argc, char *argv[]) #endif +#if HAVE_SIGNAL_H + signal(SIGPIPE,SIG_IGN); /* ignore SIGPIPE in standalone mode so that sockets created via + fsockopen() don't kill PHP if the remote site closes it. + in apache|apxs mode apache does that for us! + thies@digicol.de 20000419 */ +#endif + #ifndef ZTS if (setjmp(EG(bailout))!=0) { return -1; |
