From bcdf0b0ac4d7c3f01208762ad7284f7ee20c653a Mon Sep 17 00:00:00 2001 From: Baran Sekin Date: Mon, 6 Sep 2021 16:33:32 +0300 Subject: [PATCH] Fixed disown problems on pty --- src/RemoteTask/Task.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RemoteTask/Task.php b/src/RemoteTask/Task.php index 0d327e0..0a9d5ce 100755 --- a/src/RemoteTask/Task.php +++ b/src/RemoteTask/Task.php @@ -72,7 +72,7 @@ public function run() ); } $status = (bool) $this->command( - "bash -c '(echo @{:command} | base64 -d | bash) > @{:logFile} 2>&1 & disown && echo 1 || echo 0'", + "nohup bash -c '(echo @{:command} | base64 -d | bash) > @{:logFile} 2>&1 & disown' 2>/dev/null 1>/dev/null && echo 1 || echo 0", [ 'command' => base64_encode($command), 'logFile' => $this->logFile