]> granicus.if.org Git - python/commit
Fix os.kill tests to be more robust and work with slower machines.
authorBrian Curtin <brian.curtin@gmail.com>
Thu, 15 Apr 2010 00:40:40 +0000 (00:40 +0000)
committerBrian Curtin <brian.curtin@gmail.com>
Thu, 15 Apr 2010 00:40:40 +0000 (00:40 +0000)
commitb3dde134134c0bd08c2b7382157f9f08799aacf1
tree120d3f96c9e3b3f4002cc5cad1b8bc24cb471a2c
parent363dbccb2a77af59cbe3de5effa32017b4b73982
Fix os.kill tests to be more robust and work with slower machines.

Rather than depending on some sleep value, start up an interpreter
as a subprocess and communicate with it. Because subprocess pipes
can't be read from until EOF and I want to read from them before that,
use ctypes to peek by using PeekNamedPipe. Once the subprocess has
written the message, then it is ready to roll and accept signals.
After that, kill it.
Lib/test/test_os.py