2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 19:10:10 +00:00

Fix noderun/nodeshell filehandle exhaustion

noderun/nodeshell failed to close filehandles on child
exit.
This commit is contained in:
Jarrod Johnson 2018-01-11 12:40:53 -05:00
parent a70e3a2e19
commit 8acb59d967
2 changed files with 4 additions and 2 deletions

View File

@ -101,6 +101,7 @@ def run():
if ret is not None:
exitcode = exitcode | ret
all.discard(r)
r.close()
if desc['type'] == 'stdout' and pendingexecs:
node, cmdv = pendingexecs.popleft()
run_cmdv(node, cmdv, all, pipedesc)
@ -125,4 +126,4 @@ def run_cmdv(node, cmdv, all, pipedesc):
if __name__ == '__main__':
run()
run()

View File

@ -102,6 +102,7 @@ def run():
if ret is not None:
exitcode = exitcode | ret
all.discard(r)
r.close()
if desc['type'] == 'stdout' and pendingexecs:
node, cmdv = pendingexecs.popleft()
run_cmdv(node, cmdv, all, pipedesc)
@ -126,4 +127,4 @@ def run_cmdv(node, cmdv, all, pipedesc):
if __name__ == '__main__':
run()
run()