From d12885467461718e6486e465f84f3bfdb4d8273c Mon Sep 17 00:00:00 2001 From: holger krekel Date: Wed, 22 Jul 2009 13:24:21 +0200 Subject: [PATCH] poll for child process status after exit procedure --HG-- branch : 1.0.x --- py/execnet/register.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/py/execnet/register.py b/py/execnet/register.py index 4024757a5..9ac810b08 100644 --- a/py/execnet/register.py +++ b/py/execnet/register.py @@ -63,12 +63,15 @@ class PopenCmdGateway(InstallableGateway): def __init__(self, cmd): # on win close_fds=True does not work, not sure it'd needed #p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, close_fds=True) - p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE) + self._popen = p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE) infile, outfile = p.stdin, p.stdout self._cmd = cmd io = inputoutput.Popen2IO(infile, outfile) super(PopenCmdGateway, self).__init__(io=io) + def exit(self): + super(PopenCmdGateway, self).exit() + self._popen.poll() class PopenGateway(PopenCmdGateway): """ This Gateway provides interaction with a newly started