From 8acb59d96722499d400dd65d3095b37a5a51b539 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 11 Jan 2018 12:40:53 -0500 Subject: [PATCH] Fix noderun/nodeshell filehandle exhaustion noderun/nodeshell failed to close filehandles on child exit. --- confluent_client/bin/noderun | 3 ++- confluent_client/bin/nodeshell | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/confluent_client/bin/noderun b/confluent_client/bin/noderun index 816bf185..d7dcb242 100755 --- a/confluent_client/bin/noderun +++ b/confluent_client/bin/noderun @@ -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() \ No newline at end of file + run() diff --git a/confluent_client/bin/nodeshell b/confluent_client/bin/nodeshell index c1959d0d..02e7b66e 100755 --- a/confluent_client/bin/nodeshell +++ b/confluent_client/bin/nodeshell @@ -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() \ No newline at end of file + run()