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