summaryrefslogtreecommitdiff
path: root/ext/standard/exec.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2000-06-12 19:39:04 +0000
committerAndi Gutmans <andi@php.net>2000-06-12 19:39:04 +0000
commit719d995a9df436998c5c1e22ec150a8e4c0d1d4f (patch)
tree1baa2e75a0e5b3f40f8e57738e694f959be008ca /ext/standard/exec.c
parent5d514525459ac6fe86d480ca97d6eadcfdd2ce95 (diff)
downloadphp-git-719d995a9df436998c5c1e22ec150a8e4c0d1d4f.tar.gz
- On UNIX support popen() which works with current working directory
- when in VIRTUAL_DIR mode.
Diffstat (limited to 'ext/standard/exec.c')
-rw-r--r--ext/standard/exec.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index ad57cfd266..7fc6acc033 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -87,9 +87,9 @@ static int _Exec(int type, char *cmd, pval *array, pval *return_value)
efree(d);
d = tmp;
#ifdef PHP_WIN32
- fp = popen(d, "rb");
+ fp = V_POPEN(d, "rb");
#else
- fp = popen(d, "r");
+ fp = V_POPEN(d, "r");
#endif
if (!fp) {
php_error(E_WARNING, "Unable to fork [%s]", d);
@@ -99,9 +99,9 @@ static int _Exec(int type, char *cmd, pval *array, pval *return_value)
}
} else { /* not safe_mode */
#ifdef PHP_WIN32
- fp = popen(cmd, "rb");
+ fp = V_POPEN(cmd, "rb");
#else
- fp = popen(cmd, "r");
+ fp = V_POPEN(cmd, "r");
#endif
if (!fp) {
php_error(E_WARNING, "Unable to fork [%s]", cmd);
@@ -364,9 +364,9 @@ PHP_FUNCTION(shell_exec)
convert_to_string_ex(cmd);
#ifdef PHP_WIN32
- if ((in=popen((*cmd)->value.str.val,"rt"))==NULL) {
+ if ((in=V_POPEN((*cmd)->value.str.val,"rt"))==NULL) {
#else
- if ((in=popen((*cmd)->value.str.val,"r"))==NULL) {
+ if ((in=V_POPEN((*cmd)->value.str.val,"r"))==NULL) {
#endif
php_error(E_WARNING,"Unable to execute '%s'",(*cmd)->value.str.val);
}