mirror of
https://github.com/unraid/webgui.git
synced 2026-01-20 00:19:59 -06:00
nchan: delayed command execution
This prevents an empty popup window in certain browsers and devices
This commit is contained in:
@@ -39,7 +39,7 @@ if ($command && strncmp($name,$path,strlen($path))===0) {
|
||||
$pid = pgrep($name);
|
||||
} elseif ($start or !pgrep($name)) {
|
||||
// start command in background and return pid
|
||||
$pid = exec("nohup $name $args 1>/dev/null 2>&1 & echo \$!");
|
||||
$pid = exec("nohup bash -c 'sleep .3 && $name $args' 1>/dev/null 2>&1 & echo \$!");
|
||||
}
|
||||
}
|
||||
echo $pid;
|
||||
|
||||
Reference in New Issue
Block a user