ignore SIGPIPE in standalone-mode so that one can actually use fsockopen() *and* have the remote side close the socket whithout PHP dying!

This commit is contained in:
Thies C. Arntzen 2000-04-19 15:37:43 +00:00
parent a81e6bc04e
commit 19a9577901

View File

@ -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;