Is there a way to pause a Python subprocess, specifically in Ubuntu?
I have a GUI based program where I need the user to be able to pause or resume a subprocess. For example, if I have:
开发者_运维技巧programID = subprocess.Popen("program_name"), shell=True)
Is there a way that I can pause or resume this? I read something about using SIGTERM but I didn't quite grasp it.
To pause the process, use
os.kill(programID.pid, signal.SIGSTOP)
To resume execution, use
os.kill(programID.pid, signal.SIGCONT)
精彩评论