-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
While following code on the following command will work:
Normal use (exec):
sh file.sh
file.sh:
nohup dotnet file.dll > output.log 2>&1 & echo $! > save_pid.txt
The same code within a SSH::run(..) will semi-work:
\SSH::run([ 'cd www/laravel/storage/app/files/' . \Auth::user()->id . '/' . $fileID, 'nohup dotnet ' . $file->filename . ' > output.log 2>&1 & echo $! > save_pid.txt', ]);
Here the output.log will be created fine with the output. But the save_pid.txt with the pid of the created process will not be created.
So my first idea was to catch the pid of the created SSH Connection.
And if i want to close the process later i just kill the process of the SSH Connection.
But i couldn't found a function to catch the pid from the SSH Connection
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels