]> granicus.if.org Git - php/commitdiff
added new option "--enable-sigchild" (default is off)
authorThies C. Arntzen <thies@php.net>
Thu, 18 May 2000 19:45:34 +0000 (19:45 +0000)
committerThies C. Arntzen <thies@php.net>
Thu, 18 May 2000 19:45:34 +0000 (19:45 +0000)
when using this option php will setup it's own SIGCHLD handler.
when using oracle-libraries >= 8.1 on linux you need this option
if you are connecting using the BEQ interface - elsewise you will
see <defunc> processes whenever a php-script disconnects from oracle.

acconfig.h.in
configure.in
main/config.w32.h
main/main.c

index 432aeac76ba7c33a843a7234adae13a70d95a9fe..978c72807c9b4a6e6f67f74027d500fb53da0ec6 100644 (file)
@@ -50,6 +50,9 @@
 /* Set to the path to the dir containing safe mode executables */
 #define PHP_SAFE_MODE_EXEC_DIR /usr/local/php/bin
 
+/* Define if PHP to setup it's own SIGCHLD handler */
+#define PHP_SIGCHILD 0
+
 /* Define if you want POST/GET/Cookie track variables by default */
 #define PHP_TRACK_VARS 0
 
index 8adad8b5ee057e738002cdebaaff601a3f169151..a346b151f320646bbb8c7bd7793175d10756867a 100644 (file)
@@ -469,6 +469,15 @@ AC_ARG_WITH(exec-dir,
        AC_MSG_RESULT(/usr/local/php/bin)
 ])
 
+PHP_ARG_ENABLE(sigchild,whether to enable PHP's own SIGCHLD handler,
+[  --enable-sigchild       Enable PHP's own SIGCHLD handler.],no)
+
+if test "$PHP_SIGCHILD" = "yes"; then
+  AC_DEFINE(PHP_SIGCHILD, 1)
+else
+  AC_DEFINE(PHP_SIGCHILD, 0)
+fi
+
 PHP_ARG_ENABLE(track-vars,whether to enable track_vars variables by default,
 [  --enable-track-vars     Enable GET/POST/Cookie track variables by default.],yes)
 
index 488b2ffac0cdfe15c6ce76d4d879a592bb674be1..1e0e46f5fd99235b42bb7d0b11870b889b58aaa5 100644 (file)
@@ -2,6 +2,9 @@
 /* tested only with MS Visual C++ V5 */
 
 
+/* Define if PHP to setup it's own SIGCHLD handler (not needed on Win32) */
+#define PHP_SIGCHILD 0
+
 /* if you have resolv.lib and lib44bsd95.lib you can compile the extra 
    dns functions located in dns.c.  Set this to 1.  add resolv.lib and
    lib33bsd95.lib to the project settings, and add the path to the
index e15ce8e68d34639afaff6e0babb53388c3cd7ee1..b00cd456ec142cb3b967da22add14ddbd5170b71 100644 (file)
@@ -637,8 +637,22 @@ static void php_message_handler_for_zend(long message, void *data)
 }
 
 
+#if PHP_SIGCHILD
+static int sigchld_handler(int apar)
+{
+    int status;             
+    wait(&status);
+    signal(SIGCHLD,sigchld_handler);   
+}
+#endif
+
+
 int php_request_startup(CLS_D ELS_DC PLS_DC SLS_DC)
 {
+#if PHP_SIGCHILD
+       signal(SIGCHLD,sigchld_handler);
+#endif
+
        global_lock();
        
        php_output_startup();