You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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 thesave_pid.txt
with the pid of the created process will not be created.So my first idea was to catch the
pid
of the createdSSH 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
The text was updated successfully, but these errors were encountered: