cvs: php4 /ext/standard exec.c
| From: | Stanislav Malyshev | Date: | Mon, 26 Jun 2000 17:12:38 +0000 |
| Subject: | cvs: php4 /ext/standard exec.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-486@lists.php.net to get a copy of this message | ||
stas Mon Jun 26 10:12:38 2000 EDT
Modified files:
/php4/ext/standard exec.c
Log:
Make exec() fwork on Unix again
Index: php4/ext/standard/exec.c
diff -u php4/ext/standard/exec.c:1.36 php4/ext/standard/exec.c:1.37
--- php4/ext/standard/exec.c:1.36 Sun Jun 25 10:02:45 2000
+++ php4/ext/standard/exec.c Mon Jun 26 10:12:38 2000
@@ -15,7 +15,7 @@
| Author: Rasmus Lerdorf |
+----------------------------------------------------------------------+
*/
-/* $Id: exec.c,v 1.36 2000/06/25 17:02:45 zeev Exp $ */
+/* $Id: exec.c,v 1.37 2000/06/26 17:12:38 stas Exp $ */
#include <stdio.h>
#include "php.h"
@@ -86,7 +86,11 @@
tmp = php_escape_shell_cmd(d);
efree(d);
d = tmp;
+#ifdef PHP_WIN32
fp = V_POPEN(d, "rb");
+#else
+ fp = V_POPEN(d, "r");
+#endif
if (!fp) {
php_error(E_WARNING, "Unable to fork [%s]", d);
efree(d);
@@ -94,7 +98,11 @@
return -1;
}
} else { /* not safe_mode */
+#ifdef PHP_WIN32
fp = V_POPEN(cmd, "rb");
+#else
+ fp = V_POPEN(cmd, "r");
+#endif
if (!fp) {
php_error(E_WARNING, "Unable to fork [%s]", cmd);
efree(buf);