nlopess         Tue Feb 13 19:53:42 2007 UTC

  Added files:                 (Branch: PHP_5_2)
    /php-src/ext/standard/tests/general_functions       bug34794.phpt 

  Modified files:              
    /php-src    NEWS 
    /php-src/ext/standard       proc_open.c 
  Log:
  Fixed bug #34794 (proc_close() hangs when used with two processes)
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.536&r2=1.2027.2.547.2.537&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.536 php-src/NEWS:1.2027.2.547.2.537
--- php-src/NEWS:1.2027.2.547.2.536     Tue Feb 13 18:29:10 2007
+++ php-src/NEWS        Tue Feb 13 19:53:42 2007
@@ -17,6 +17,8 @@
 - Fixed bug #40109 (iptcembed fails on non-jfif jpegs). (Tony)
 - Fixed bug #39836 (SplObjectStorage empty after unserialize). (Marcus)
 - Fixed bug #37799 (ftp_ssl_connect() falls back to non-ssl connection). (Nuno)
+- Fixed bug #34794 (proc_close() hangs when used with two processes).
+  (jdolecek at netbsd dot org, Nuno)
 
 08 Feb 2007, PHP 5.2.1
 - Added read-timeout context option "timeout" for HTTP streams. (Hannes, 
Ilia). 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/proc_open.c?r1=1.36.2.1.2.9&r2=1.36.2.1.2.10&diff_format=u
Index: php-src/ext/standard/proc_open.c
diff -u php-src/ext/standard/proc_open.c:1.36.2.1.2.9 
php-src/ext/standard/proc_open.c:1.36.2.1.2.10
--- php-src/ext/standard/proc_open.c:1.36.2.1.2.9       Tue Feb 13 15:55:45 2007
+++ php-src/ext/standard/proc_open.c    Tue Feb 13 19:53:42 2007
@@ -15,7 +15,7 @@
    | Author: Wez Furlong <[EMAIL PROTECTED]>                           |
    +----------------------------------------------------------------------+
  */
-/* $Id: proc_open.c,v 1.36.2.1.2.9 2007/02/13 15:55:45 tony2001 Exp $ */
+/* $Id: proc_open.c,v 1.36.2.1.2.10 2007/02/13 19:53:42 nlopess Exp $ */
 
 #if 0 && (defined(__linux__) || defined(sun) || defined(__IRIX__))
 # define _BSD_SOURCE           /* linux wants this when XOPEN mode is on */
@@ -943,6 +943,10 @@
                                                        
descriptors[i].mode_flags), mode_string, NULL);
 #else
                                stream = 
php_stream_fopen_from_fd(descriptors[i].parentend, mode_string, NULL);
+# if defined(F_SETFD) && defined(FD_CLOEXEC)
+                               /* mark the descriptor close-on-exec, so that 
it won't be inherited by potential other children */
+                               fcntl(descriptors[i].parentend, F_SETFD, 
FD_CLOEXEC);
+# endif
 #endif
                                if (stream) {
                                        zval *retfp;

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug34794.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/general_functions/bug34794.phpt
+++ php-src/ext/standard/tests/general_functions/bug34794.phpt

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to