mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Close open files in case of failure (Amit)
This commit is contained in:
parent
158ec65ba2
commit
113aa2339d
1 changed files with 7 additions and 0 deletions
|
@ -748,6 +748,13 @@ PHP_FUNCTION(proc_open)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FALSE == newprocok) {
|
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");
|
php_error_docref(NULL TSRMLS_CC, E_WARNING, "CreateProcess failed");
|
||||||
goto exit_fail;
|
goto exit_fail;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue