svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/TSRM/tsrm_win32.c trunk/TSRM/tsrm_win32.c
| From: | Pierre-Alain Joye | Date: | Thu, 20 Aug 2009 09:03:19 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/TSRM/tsrm_win32.c trunk/TSRM/tsrm_win32.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-60190@lists.php.net to get a copy of this message | ||
pajoye Thu, 20 Aug 2009 09:03:19 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=287495
Log:
- revert fix for #43327, it breaks system&co functions
Bug: http://bugs.php.net/43327 (Closed) wrong return value
from mail(), if sendmail_path is wrong
Changed paths:
U php/php-src/branches/PHP_5_3/NEWS
U php/php-src/branches/PHP_5_3/TSRM/tsrm_win32.c
U php/php-src/trunk/TSRM/tsrm_win32.c
Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS 2009-08-20 08:24:48 UTC (rev 287494)
+++ php/php-src/branches/PHP_5_3/NEWS 2009-08-20 09:03:19 UTC (rev 287495)
@@ -142,8 +142,6 @@
- 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).
Modified: php/php-src/branches/PHP_5_3/TSRM/tsrm_win32.c
===================================================================
--- php/php-src/branches/PHP_5_3/TSRM/tsrm_win32.c 2009-08-20 08:24:48 UTC (rev 287494)
+++ php/php-src/branches/PHP_5_3/TSRM/tsrm_win32.c 2009-08-20 09:03:19 UTC (rev 287495)
@@ -312,6 +312,7 @@
HANDLE in, out;
DWORD dwCreateFlags = 0;
process_pair *proc;
+ char *cmd;
TSRMLS_FETCH();
security.nLength = sizeof(SECURITY_ATTRIBUTES);
@@ -347,9 +348,13 @@
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);
Modified: php/php-src/trunk/TSRM/tsrm_win32.c
===================================================================
--- php/php-src/trunk/TSRM/tsrm_win32.c 2009-08-20 08:24:48 UTC (rev 287494)
+++ php/php-src/trunk/TSRM/tsrm_win32.c 2009-08-20 09:03:19 UTC (rev 287495)
@@ -313,6 +313,7 @@
HANDLE in, out;
DWORD dwCreateFlags = 0;
process_pair *proc;
+ char *cmd;
TSRMLS_FETCH();
security.nLength = sizeof(SECURITY_ATTRIBUTES);
@@ -349,9 +350,13 @@
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);