killing own process in windows

News123 news123 at free.fr
Sun Mar 7 16:54:28 EST 2010


Hi Martin.
Hellwig wrote:
> 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
>>
>>
> 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.
I



Thanks. this looks like a good solution for an XMLRPC server.
However when playing with different server modules I fall over and over
again over code, that can't be shutdown nicely.

Currently I'm still struggling with multiprocessing.managers,BaseManager

bye

N



More information about the Python-list mailing list