mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
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:
parent
a81e6bc04e
commit
19a9577901
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user