mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:35:30 +00:00
Windows hack for proc_run() from Marshall
This commit is contained in:
parent
8080fdf558
commit
e40cdb2047
1 changed files with 7 additions and 2 deletions
9
boot.php
9
boot.php
|
@ -1574,8 +1574,13 @@ function proc_run($cmd){
|
|||
$args[$x] = escapeshellarg($args[$x]);
|
||||
|
||||
$cmdline = implode($args," ");
|
||||
if(is_windows())
|
||||
proc_close(proc_open('cmd /c start /b ' . $cmdline,array(),$foo));
|
||||
|
||||
|
||||
if(is_windows()) {
|
||||
$cwd = getcwd();
|
||||
$cmd = "cmd /c start \"title\" /D \"$cwd\" /b $cmdline";
|
||||
proc_close(proc_open($cmd, array(), $foo));
|
||||
}
|
||||
else
|
||||
proc_close(proc_open($cmdline." &",array(),$foo));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue