poll for child process status after exit procedure
--HG-- branch : 1.0.x
This commit is contained in:
parent
b7789714fd
commit
d128854674
|
@ -63,12 +63,15 @@ class PopenCmdGateway(InstallableGateway):
|
||||||
def __init__(self, cmd):
|
def __init__(self, cmd):
|
||||||
# on win close_fds=True does not work, not sure it'd needed
|
# 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, 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
|
infile, outfile = p.stdin, p.stdout
|
||||||
self._cmd = cmd
|
self._cmd = cmd
|
||||||
io = inputoutput.Popen2IO(infile, outfile)
|
io = inputoutput.Popen2IO(infile, outfile)
|
||||||
super(PopenCmdGateway, self).__init__(io=io)
|
super(PopenCmdGateway, self).__init__(io=io)
|
||||||
|
|
||||||
|
def exit(self):
|
||||||
|
super(PopenCmdGateway, self).exit()
|
||||||
|
self._popen.poll()
|
||||||
|
|
||||||
class PopenGateway(PopenCmdGateway):
|
class PopenGateway(PopenCmdGateway):
|
||||||
""" This Gateway provides interaction with a newly started
|
""" This Gateway provides interaction with a newly started
|
||||||
|
|
Loading…
Reference in New Issue