In ovs-bugtool, we do a bunch of Popen calls to
get the results of some shell commands with stdout
set to PIPE. Once we are done, we need to
close the file descriptors.
Bug #11083.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
def terminate(self):
if self.running:
try:
+ self.proc.stdout.close()
os.kill(self.proc.pid, SIGTERM)
except:
pass
line = self.proc.stdout.readline()
if line == '':
# process exited
+ self.proc.stdout.close()
self.status = self.proc.wait()
self.proc = None
self.running = False