Skip to content

Commit 7d6384d

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Create a new console for each test worker on Windows
2 parents ac0853e + e1de11d commit 7d6384d

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

ext/standard/proc_open.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ PHP_FUNCTION(proc_open)
501501
int bypass_shell = 0;
502502
int blocking_pipes = 0;
503503
int create_process_group = 0;
504+
int create_new_console = 0;
504505
#else
505506
char **argv = NULL;
506507
#endif
@@ -595,6 +596,13 @@ PHP_FUNCTION(proc_open)
595596
create_process_group = 1;
596597
}
597598
}
599+
600+
item = zend_hash_str_find(Z_ARRVAL_P(other_options), "create_new_console", sizeof("create_new_console") - 1);
601+
if (item != NULL) {
602+
if (Z_TYPE_P(item) == IS_TRUE || ((Z_TYPE_P(item) == IS_LONG) && Z_LVAL_P(item))) {
603+
create_new_console = 1;
604+
}
605+
}
598606
}
599607
#endif
600608

@@ -918,7 +926,9 @@ PHP_FUNCTION(proc_open)
918926
if (create_process_group) {
919927
dwCreateFlags |= CREATE_NEW_PROCESS_GROUP;
920928
}
921-
929+
if (create_new_console) {
930+
dwCreateFlags |= CREATE_NEW_CONSOLE;
931+
}
922932
envpw = php_win32_cp_env_any_to_w(env.envp);
923933
if (envpw) {
924934
dwCreateFlags |= CREATE_UNICODE_ENVIRONMENT;

ext/standard/tests/file/windows_mb_path/CONFLICTS

Lines changed: 0 additions & 3 deletions
This file was deleted.

run-tests.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1428,7 +1428,8 @@ function run_all_tests_parallel($test_files, $env, $redir_tested) {
14281428
"TEST_PHP_URI" => $sockUri,
14291429
],
14301430
[
1431-
"suppress_errors" => TRUE
1431+
"suppress_errors" => TRUE,
1432+
'create_new_console' => TRUE,
14321433
]
14331434
);
14341435
if ($proc === FALSE) {

0 commit comments

Comments
 (0)