cvs: php-src /ext/standard proc_open.c
| From: | Nuno Lopes | Date: | Tue, 02 Jan 2007 15:31:58 +0000 |
| Subject: | cvs: php-src /ext/standard proc_open.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-42518@lists.php.net to get a copy of this message | ||
nlopess Tue Jan 2 15:31:58 2007 UTC
Modified files:
/php-src/ext/standard proc_open.c
Log:
MFB
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/proc_open.c?r1=1.48&r2=1.49&diff_format=u
Index: php-src/ext/standard/proc_open.c
diff -u php-src/ext/standard/proc_open.c:1.48 php-src/ext/standard/proc_open.c:1.49
--- php-src/ext/standard/proc_open.c:1.48 Mon Jan 1 09:29:32 2007
+++ php-src/ext/standard/proc_open.c Tue Jan 2 15:31:58 2007
@@ -15,7 +15,7 @@
| Author: Wez Furlong <wez@thebrainroom.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: proc_open.c,v 1.48 2007/01/01 09:29:32 sebastian Exp $ */
+/* $Id: proc_open.c,v 1.49 2007/01/02 15:31:58 nlopess Exp $ */
#if 0 && (defined(__linux__) || defined(sun) || defined(__IRIX__))
# define _BSD_SOURCE /* linux wants this when XOPEN mode is on */
@@ -602,8 +602,6 @@
}
#endif
-
-
} else if (strcmp(Z_STRVAL_PP(ztype), "file") == 0) {
zval **zfile, **zmode;
char *filename;
@@ -781,7 +779,8 @@
/* clean up all the descriptors */
for (i = 0; i < ndesc; i++) {
close(descriptors[i].childend);
- close(descriptors[i].parentend);
+ if (descriptors[i].parentend)
+ close(descriptors[i].parentend);
}
php_error_docref(NULL TSRMLS_CC, E_WARNING, "procve failed - %s", strerror(errno));
goto exit_fail;
@@ -850,7 +849,8 @@
/* clean up all the descriptors */
for (i = 0; i < ndesc; i++) {
close(descriptors[i].childend);
- close(descriptors[i].parentend);
+ if (descriptors[i].parentend)
+ close(descriptors[i].parentend);
}
php_error_docref(NULL TSRMLS_CC, E_WARNING, "fork failed - %s", strerror(errno));