![]() ![]() # Subprocess was created, so it had a PID and has a memory footprint, ![]() Proc = subprocess.pOpen(cmd, autostart=False) # autostart argument does not exist I would love it if I could do this: cmd = Furthermore, I know I could create a class wrapper around the subprocess, that won't create it until I actually want to run it, but then I won't have a PID assigned to it yet and I won't be able to check stats like memory footprint of the unstarted process. Also, I know I could easily wrap the subprocess in a parent process which will wait for a resume signal before proceeding, but I would like a less hacky, more elegant solution if one exists. ![]() Question: How can I start the subprocess in a suspended state? I understand that very little time will elapse between creating the subprocess and suspending it, but I am interested in a seamless solution. Proc_handle = psutil.Process(pid=proc.pid) # Subprocess was created in a running state I can create a subprocess in Python and suspend it like this: proc = subprocess.pOpen() ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |