diff options
author | Pierre Joye <pajoye@php.net> | 2009-08-20 09:03:19 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2009-08-20 09:03:19 +0000 |
commit | 05f86b6edbec6fb683fa3850d1c542e152879120 (patch) | |
tree | e5c7248091791a8f0c2262ffa19380825a8ace63 | |
parent | 897083659e9430c269e6920e38a551a05ea846b6 (diff) | |
download | php-git-05f86b6edbec6fb683fa3850d1c542e152879120.tar.gz |
- revert fix for #43327, it breaks system&co functions
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | TSRM/tsrm_win32.c | 7 |
2 files changed, 6 insertions, 3 deletions
@@ -142,8 +142,6 @@ PHP NEWS - Fixed bug #45554 (Inconsistent behavior of the u format char). (Derick) - Fixed bug #43510 (stream_get_meta_data() does not return same mode as used in fopen). (Jani) -- Fixed #43327, wrong return value from mail(), if sendmail_path is wrong. - (Garrett) - Fixed bug #42434 (ImageLine w/ antialias = 1px shorter). (wojjie at gmail dot com, Kalle) - Fixed bug #38091 (Mail() does not use FQDN when sending SMTP helo). diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index a22f31a922..53cfa6175b 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -312,6 +312,7 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, HANDLE in, out; DWORD dwCreateFlags = 0; process_pair *proc; + char *cmd; TSRMLS_FETCH(); security.nLength = sizeof(SECURITY_ATTRIBUTES); @@ -347,9 +348,13 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, dwCreateFlags |= CREATE_NO_WINDOW; } - if (!CreateProcess(NULL, command, &security, &security, security.bInheritHandle, dwCreateFlags, env, cwd, &startup, &process)) { + cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c ")+2); + sprintf(cmd, "%s /c \"%s\"", TWG(comspec), command); + + if (!CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, dwCreateFlags, env, cwd, &startup, &process)) { return NULL; } + free(cmd); CloseHandle(process.hThread); proc = process_get(NULL TSRMLS_CC); |