shell2http
shell2http copied to clipboard
Any way to detach executed process?
It seems that shell2http waits for any child process that is spawned to finish. For example if your un script.py that will spawn another child process script2.py and exits, it will still wait for script2.py to finish. Even thou _script.py has exited. I have tried using & and & disown when starting the script it still seems to be attached to the process and every child process.
You can try using nohup command, like this:
shell2http /cmd 'nohup script.py & echo ok'
this will still block the http-request, but nevertheless your process will continue to run in the background.
For me, it worked that command:
shell2http /date 'nohup sh -c "while true; do sleep 1; date > ~/tmp/date.txt; done" & echo ok'
In the future I will probably add an option for the command, which would indicate that this command is "background", because the processing of the output of such a command will be different, and cannot be determined from the command text.
Note for me: for background commands it can be use osExecCommand.Process.Release()