This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brian.curtin
Recipients brian.curtin, docs@python, eli.bendersky
Date 2011-11-11.14:19:24
SpamBayes Score 2.5305108e-06
Marked as misclassified No
Message-id <1321021166.05.0.563844288647.issue13368@psf.upfronthosting.co.za>
In-reply-to
Content
> But it is useless for terminating a process with os.kill() in combination with signal.SIGTERM, which corresponds to a CTRL-C-EVENT.

SIGTERM does not correspond to CTRL_C_EVENT. They may be similar in what they do, but os.kill on Windows only works with exactly CTRL_C_EVENT and CTRL_BREAK_EVENT, as this uses GenerateConsoleCtrlEvent which only works with those two values. As the documentation states, anything other than those two constants is sent to TerminateProcess. If you call os.kill with signal.SIGTERM, it would kill the process with return code 15.



I will look into adjusting the text a little, and I also need to look into the tests. I currently have CTRL_C_EVENT tests skipped, probably because I am passing the wrong process stuff as he mentioned. I had it working at some point, but I may have generalized it too far.
History
Date User Action Args
2011-11-11 14:19:26brian.curtinsetrecipients: + brian.curtin, eli.bendersky, docs@python
2011-11-11 14:19:26brian.curtinsetmessageid: <1321021166.05.0.563844288647.issue13368@psf.upfronthosting.co.za>
2011-11-11 14:19:25brian.curtinlinkissue13368 messages
2011-11-11 14:19:24brian.curtincreate