how to terminate a process on win32?

Joe Wong joewong at mango.cc
Wed May 26 22:32:54 EDT 2004


But calling TerminateProcess will stop the application right away. I need
someway that the process being killed get notified and thus to carry out
some procedure before shut down. On Linux, I can use kill(pid, signum) to
achive this but on windows?


----- Original Message ----- 
From: "Myles" <myles at geocities.com>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Wednesday, May 26, 2004 9:49 AM
Subject: Re: how to terminate a process on win32?


> "Joe Wong" <joewong at mango.cc> wrote in message
news:<mailman.164.1085188722.6949.python-list at python.org>...
>
> > os.popen2() to start my daemon, I can't figure out a way to stop it
> > 'nicely'... Is there anything that I can do?
>
> Mark Hammond's Python for Windows extensions includes a demonstration
> of killing processes on Windows:
>
> On my PC:
> C:\Python23\Lib\site-packages\win32\scripts\killProcName.py
>
> Python for Windows extensions:
> http://starship.python.net/crew/mhammond/
> https://sourceforge.net/projects/pywin32/
>
> Regards, Myles.
> -- 
> http://mail.python.org/mailman/listinfo/python-list
>





More information about the Python-list mailing list