"Joe Wong" <jo*****@mango.cc> wrote:
I am developing two app on Windows, one is a GUI using wxPython and the
other is like a daemon process. The GUI app will have a start/stop
button to control the excution of the daemon. While I know how to use
os.popen2() to start my daemon, I can't figure out a way to stop it
'nicely'... Is there anything that I can do?
It depends on your OS. I remember once upon a time, in order to kill
processes sucessfully for all Windows platforms (from Win98 to NT to
2000/XP), I had to resort to using tlist.exe and kill.exe, plus
w9xpopen.exe for pipes in Windows 98. It was kind of annoying... I
seem to remember short name and long names were problem, too. At the
end, the killing logic became a small program in itself!
regards,
Hung Jung