summaryrefslogtreecommitdiff
path: root/ext/standard/proc_open.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/proc_open.c')
-rw-r--r--ext/standard/proc_open.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c
index e8ebfad6d7..6f3ddbea78 100644
--- a/ext/standard/proc_open.c
+++ b/ext/standard/proc_open.c
@@ -953,13 +953,13 @@ PHP_FUNCTION(proc_open)
wchar_t *cmdw2;
- len = (sizeof(COMSPEC_NT) + sizeof(" /c ") + tmp_len + 1);
+ len = (sizeof(COMSPEC_NT) + sizeof(" /s /c ") + tmp_len + 3);
cmdw2 = (wchar_t *)malloc(len * sizeof(wchar_t));
if (!cmdw2) {
php_error_docref(NULL, E_WARNING, "Command conversion failed");
goto exit_fail;
}
- ret = _snwprintf(cmdw2, len, L"%hs /c %s", COMSPEC_NT, cmdw);
+ ret = _snwprintf(cmdw2, len, L"%hs /s /c \"%s\"", COMSPEC_NT, cmdw);
if (-1 == ret) {
free(cmdw2);