Message223739
I understand that os.kill(pid, sig) should call TerminateProcess() or GenerateConsoleCtrlEvent() depending on the value of sig.
The problem is that these two functions are very different. A process can set a control handler for CTRL_C_EVENT and CTRL_BREAK_EVENT, so can decide how to handle GenerateConsoleCtrlEvent() event.
TerminateProcess() kills the process with the specified exit code.
To me it looks wrong to call TerminateProcess() with a signal number or event for the exit code!? We need to expose TerminateProcess() as a new Python function, os.TerminateProcess(pid, exitcode) for example.
os.kill(pid, sig) should raise a ValueError if sig is not CTRL_C_EVENT nor CTRL_BREAK_EVENT. |
|
Date |
User |
Action |
Args |
2014-07-23 13:45:30 | vstinner | set | recipients:
+ vstinner, pitrou, tim.golden, r.david.murray, asvetlov, BreamoreBoy, zach.ware |
2014-07-23 13:45:30 | vstinner | set | messageid: <1406123130.01.0.0284576532858.issue14484@psf.upfronthosting.co.za> |
2014-07-23 13:45:29 | vstinner | link | issue14484 messages |
2014-07-23 13:45:29 | vstinner | create | |
|