From 2339b5c7eb8d3f564bf5c6b327c357f73fdf4bce Mon Sep 17 00:00:00 2001 From: bergware Date: Sat, 1 Oct 2022 01:29:07 +0200 Subject: [PATCH] nchan: delayed command execution This prevents an empty popup window in certain browsers and devices --- plugins/dynamix/include/StartCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dynamix/include/StartCommand.php b/plugins/dynamix/include/StartCommand.php index 0d244f008..cec3deffa 100644 --- a/plugins/dynamix/include/StartCommand.php +++ b/plugins/dynamix/include/StartCommand.php @@ -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;