This is an automated email from the ASF dual-hosted git repository.
ibzib pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new c7ace41 [BEAM-7670] portable py: prevent race opening worker
subprocess
new 7906149 Merge pull request #8992 from ibzib/subprocess
c7ace41 is described below
commit c7ace41f6711e873a4e3ad1daedd73ac6fb89618
Author: Kyle Weaver <[email protected]>
AuthorDate: Tue Jul 2 17:23:34 2019 -0700
[BEAM-7670] portable py: prevent race opening worker subprocess
---
sdks/python/apache_beam/runners/portability/portable_runner.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sdks/python/apache_beam/runners/portability/portable_runner.py
b/sdks/python/apache_beam/runners/portability/portable_runner.py
index 117477a..b35b8d5 100644
--- a/sdks/python/apache_beam/runners/portability/portable_runner.py
+++ b/sdks/python/apache_beam/runners/portability/portable_runner.py
@@ -495,7 +495,10 @@ class BeamFnExternalWorkerPoolServicer(
self._worker_threads,
start_worker_request.worker_id)]
logging.warn("Starting worker with command %s" % (command))
- worker_process = subprocess.Popen(command, stdout=subprocess.PIPE)
+ worker_process = subprocess.Popen(
+ command,
+ stdout=subprocess.PIPE,
+ close_fds=True)
# Register to kill the subprocess on exit.
atexit.register(worker_process.kill)