kvmsmart.blogg.se

Python subprocess background no wait
Python subprocess background no wait







python subprocess background no wait

Use command's own methods: Among other things, such utilities as dd use signals. See a related question for usage of strace to also figure out if the long running command has exited. Otherwise, if you see syscalls running by, then command is doing something else. If the output you see is stuck on read() syscall, it means the command probably is waiting for input. For instance, in another terminal tab run pgrep -f firefox which may 1234 as example and then sudo strace -f -p 1234. For that you need to find out PID of the program. Spying on syscalls:If you do have superuser privilege, you can run strace in another terminal to see what is currently being done. Otherwise, the utility is either running tasks or is not written properly. Therefore, if a utility is waiting for input it will exit upon receiving the key combination.

python subprocess background no wait

Terminals and utilities in canonical mode send all available text to read() syscall upon receiving EOT signal bound to this key combination, and if there's no input - read() returns negative exit status which most utilities accept as signal to exit. Try signalling end of input:Without superuser privileges it is hard to know what is going on underneath the hood.









Python subprocess background no wait