cvs: php-src(PHP_5_3) /ext/standard proc_open.c /ext/standard/tests/file bug41874.phpt bug41874_1.phpt bug41874_2.phpt bug41874_3.phpt
| From: | Pierre-Alain Joye | Date: | Tue, 09 Jun 2009 00:25:37 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /ext/standard proc_open.c /ext/standard/tests/file bug41874.phpt bug41874_1.phpt bug41874_2.phpt bug41874_3.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-58567@lists.php.net to get a copy of this message | ||
pajoye Tue Jun 9 00:25:37 2009 UTC
Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/file bug41874.phpt bug41874_1.phpt
bug41874_2.phpt bug41874_3.phpt
Modified files:
/php-src/ext/standard proc_open.c
Log:
#41874, separate STDOUT and STDERR in exec functions
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/proc_open.c?r1=1.36.2.1.2.17.2.7&r2=1.36.2.1.2.17.2.8&diff_format=u
Index: php-src/ext/standard/proc_open.c
diff -u php-src/ext/standard/proc_open.c:1.36.2.1.2.17.2.7
php-src/ext/standard/proc_open.c:1.36.2.1.2.17.2.8
--- php-src/ext/standard/proc_open.c:1.36.2.1.2.17.2.7 Wed Dec 31 11:15:45 2008
+++ php-src/ext/standard/proc_open.c Tue Jun 9 00:25:37 2009
@@ -15,7 +15,7 @@
| Author: Wez Furlong <wez@thebrainroom.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: proc_open.c,v 1.36.2.1.2.17.2.7 2008/12/31 11:15:45 sebastian Exp $ */
+/* $Id: proc_open.c,v 1.36.2.1.2.17.2.8 2009/06/09 00:25:37 pajoye Exp $ */
#if 0 && (defined(__linux__) || defined(sun) || defined(__IRIX__))
# define _BSD_SOURCE /* linux wants this when XOPEN mode is on */
@@ -483,6 +483,7 @@
STARTUPINFO si;
BOOL newprocok;
SECURITY_ATTRIBUTES security;
+ DWORD dwCreateFlags = 0;
char *command_with_cmd;
UINT old_error_mode;
#endif
@@ -754,12 +755,17 @@
old_error_mode = SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOGPFAULTERRORBOX);
}
+ dwCreateFlags = NORMAL_PRIORITY_CLASS;
+ if(strcmp(sapi_module.name, "cli") != 0) {
+ dwCreateFlags |= CREATE_NO_WINDOW;
+ }
+
if (bypass_shell) {
- newprocok = CreateProcess(NULL, command, &security, &security, TRUE,
NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW, env.envp, cwd, &si, &pi);
+ newprocok = CreateProcess(NULL, command, &security, &security, TRUE, dwCreateFlags,
env.envp, cwd, &si, &pi);
} else {
spprintf(&command_with_cmd, 0, "%s /c %s", GetVersion() < 0x80000000 ?
COMSPEC_NT : COMSPEC_9X, command);
- newprocok = CreateProcess(NULL, command_with_cmd, &security, &security, TRUE,
NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW, env.envp, cwd, &si, &pi);
+ newprocok = CreateProcess(NULL, command_with_cmd, &security, &security, TRUE,
dwCreateFlags, env.envp, cwd, &si, &pi);
efree(command_with_cmd);
}
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug41874.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/file/bug41874.phpt
+++ php-src/ext/standard/tests/file/bug41874.phpt
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug41874_1.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/file/bug41874_1.phpt
+++ php-src/ext/standard/tests/file/bug41874_1.phpt
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug41874_2.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/file/bug41874_2.phpt
+++ php-src/ext/standard/tests/file/bug41874_2.phpt
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug41874_3.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/file/bug41874_3.phpt
+++ php-src/ext/standard/tests/file/bug41874_3.phpt