jezdez / envdir

A Python port of daemontools' envdir.
https://envdir.readthedocs.io/
MIT License
229 stars 28 forks source link

Kill child process #10

Closed ticosax closed 11 years ago

ticosax commented 11 years ago

Hi,

For wrapped processes like uwsgi, capturing KeyboardInterrupt exception prevent child process to stop correctly, thus end-up as a zombie process.

This patch try to address this issue by stopping explicitly the child-process.

What do you think ?

Cheers, Nicolas.

ticosax commented 11 years ago

test are broken. Fixing

jezdez commented 11 years ago

Interesting, can you write some tests for this?

ticosax commented 11 years ago

for testing topic: the thing is I try to see how cram can handle KeyboardInterrupt but, he doesn't. What do you suggest ? I can write a regular test with unittest module ? or use py.test or whatever .. any preference ?

ticosax commented 11 years ago

I found timeout command, that is able to inject the KeyboardInterrupt within the envdir process. But I can not assert returncode is 0 because timeout override it. So the test check that not traceback is displayed

ticosax commented 11 years ago

Hi @jezdez, what is the status of this PR ?