[PATCH 2 of 4 v2] killdaemons: add windows implementation

Adrian Buehlmann adrian at cadifra.com
Tue Aug 21 03:32:54 CDT 2012


On 2012-08-21 10:02, Adrian Buehlmann wrote:
> On 2012-08-21 09:09, Martin Geisler wrote:
[..]
>> I worked around it by removing the os.kill(pid, 0) calls from
>> run-tests.py -- as of Python 2.7, os.kill(pid, signal.SIGTERM) works as
>> it should on Windows:
>>
>>   http://docs.python.org/library/os#os.kill
> 
> [..]
> 
>> Since this is for Windows, I'm okay with depending on a recent Python.
> 
> Which is completely unneeded, given that the implementation of Python
> 2.7 just calls the TerminateProcess() API as well (as also documented at
> the link you posted).

FWIW, the Python implementation (of the 2.7 branch) apparently can be
found here:

http://hg.python.org/cpython/file/2.7/Modules/posixmodule.c#l4154

Note that (IIUC) we have no console when "serve -d" is running, so I
strongly doubt that GenerateConsoleCtrlEvent would have any effect (but
I didn't try it).


More information about the Mercurial-devel mailing list