poll for child process status after exit procedure

--HG--
branch : 1.0.x
This commit is contained in:
holger krekel 2009-07-22 13:24:21 +02:00
parent b7789714fd
commit d128854674
1 changed files with 4 additions and 1 deletions

View File

@ -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