dmitry Tue Jan 9 16:27:17 2007 UTC Modified files: (Branch: PHP_5_2) /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.36.2.1.2.7&r2=1.36.2.1.2.8&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.7 php-src/ext/standard/proc_open.c:1.36.2.1.2.8 --- php-src/ext/standard/proc_open.c:1.36.2.1.2.7 Sat Jan 6 09:02:02 2007 +++ php-src/ext/standard/proc_open.c Tue Jan 9 16:27:17 2007 @@ -15,7 +15,7 @@ | Author: Wez Furlong <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: proc_open.c,v 1.36.2.1.2.7 2007/01/06 09:02:02 dmitry Exp $ */ +/* $Id: proc_open.c,v 1.36.2.1.2.8 2007/01/09 16:27:17 dmitry Exp $ */ #if 0 && (defined(__linux__) || defined(sun) || defined(__IRIX__)) # define _BSD_SOURCE /* linux wants this when XOPEN mode is on */ @@ -755,6 +755,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