Hi all!
I hope someone can help me out here!
I'm running a GUI in python which is able to launch a separate python process that will run forever. In rare cases I will want to kill the launched process. Every time I do so, I end up with the process as defunct. Can anybody help me clean it up in a nice way?
My code snippets:
#Launching a separate process (no communication in between the process needed)
# When closing the GUI, the launched program should not be killed.
command = ['test.py',' -c ',config]
process = subprocess.Pope n(command, preexec_fn = os.setsid)
On request from GUI I do the following:
os.kill(process .pid,9)
It is all running on Linux.
Anyone knows why I'm getting the defunc problem?
-Maria
I hope someone can help me out here!
I'm running a GUI in python which is able to launch a separate python process that will run forever. In rare cases I will want to kill the launched process. Every time I do so, I end up with the process as defunct. Can anybody help me clean it up in a nice way?
My code snippets:
#Launching a separate process (no communication in between the process needed)
# When closing the GUI, the launched program should not be killed.
command = ['test.py',' -c ',config]
process = subprocess.Pope n(command, preexec_fn = os.setsid)
On request from GUI I do the following:
os.kill(process .pid,9)
It is all running on Linux.
Anyone knows why I'm getting the defunc problem?
-Maria
Comment