dmitry Tue Jan 9 16:27:32 2007 UTC
Modified files:
/php-src/ext/standard proc_open.c
Log:
Close open files in case of failure (Amit)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/proc_open.c?r1=1.50&r2=1.51&diff_format=u
Index: php-src/ext/standard/proc_open.c
diff -u php-src/ext/standard/proc_open.c:1.50
php-src/ext/standard/proc_open.c:1.51
--- php-src/ext/standard/proc_open.c:1.50 Sat Jan 6 09:08:06 2007
+++ php-src/ext/standard/proc_open.c Tue Jan 9 16:27:32 2007
@@ -15,7 +15,7 @@
| Author: Wez Furlong <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: proc_open.c,v 1.50 2007/01/06 09:08:06 dmitry Exp $ */
+/* $Id: proc_open.c,v 1.51 2007/01/09 16:27:32 dmitry Exp $ */
#if 0 && (defined(__linux__) || defined(sun) || defined(__IRIX__))
# define _BSD_SOURCE /* linux wants this when XOPEN mode is on */
@@ -748,6 +748,13 @@
}
if (FALSE == newprocok) {
+ /* clean up all the descriptors */
+ for (i = 0; i < ndesc; i++) {
+ CloseHandle(descriptors[i].childend);
+ if (descriptors[i].parentend) {
+ CloseHandle(descriptors[i].parentend);
+ }
+ }
php_error_docref(NULL TSRMLS_CC, E_WARNING, "CreateProcess
failed");
goto exit_fail;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php