c - Detect stop process Python -
i have c program. want run , stop @ specific points, , allow python script things while stopped.
what did set line @ stopping points in c program:
kill(getpid(), sigstop);
if python code has line:
subprocess.call("./prog");
it stuck forever, because c programme never terminated.
if utilize this:
subprocess.popen("./prog");
it resumes before code section done.
how can check if subprocess stopped? or there solution? of import me maintain c programme running.
thank you, marina
i don't know what's purpose, if want check subprocess' status, utilize popen.poll()
, if want wait stop, utilize popen.wait()
.
or need check status periodically? if so, seek threading.timer()
.
python c linux
No comments:
Post a Comment