killing own process in windows

Martin P. Hellwig martin.hellwig at dcuktec.org
Sun Mar 7 16:28:16 EST 2010


On 03/07/10 21:08, News123 wrote:
> Hi,
>
>
> How can I kill my own process?
>
> Some multithreaded programs, that I have are unable to stop when ctrl-C
> is pressed.
> Some can't be stopped with sys.exit()
>
> So I'd just like to terminate my own program.
>
>
> Examples of non killable (not killable with CTRL-C) programs:
> - A program, that started an XMLRPC server with serve_forever
> - a program, that started a multiprocessing.Manager with serve_forever
>
>
> thanks in advance for some ideas.
>
>
> N

If it is just the xml rpc server you want to kill, there might be better 
ways. For example look at:
http://code.google.com/p/dcuktec/source/browse/source/wrapped_xmlrpc_server/rpc.py
with perhaps special interest at the comment on lines 172-174.

-- 
mph



More information about the Python-list mailing list