[py-dev] Keyboard interrupt causes unclean shutdown in py.test & py.execnet
Simon
5kycsae02 at sneakemail.com
Mon Apr 20 06:07:58 CEST 2009
Hi all,
In my test harness, I often need to run the test code against a server. To do this I kick off a process on another machine (from the test scripts) to open up network connections. This remote process is run using py.execnet.
What I find is that if the tests run to completion, everything is okay. However if I Control-C the test harness halfway through, the remote machine is left with an orphaned process:
python -u -c exec input()
It looks like the sshd instance has been killed but the python process is still alive.
What is the correct way to shutdown an execnet connection so that there a no orphans left behind? Also what is a good way to hook this into the py.test infrastructure.?
Simon
More information about the py-dev
mailing list