Merge "Ceph backup: set close_fds on Popen"

This commit is contained in:
Zuul 2018-08-20 17:55:54 +00:00 committed by Gerrit Code Review
commit c54fc62f7e
1 changed files with 4 additions and 2 deletions

View File

@ -545,7 +545,8 @@ class CephBackupDriver(driver.BackupDriver):
try:
p1 = subprocess.Popen(cmd1, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stderr=subprocess.PIPE,
close_fds=True)
except OSError as e:
LOG.error("Pipe1 failed - %s ", e)
raise
@ -559,7 +560,8 @@ class CephBackupDriver(driver.BackupDriver):
try:
p2 = subprocess.Popen(cmd2, stdin=p1.stdout,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stderr=subprocess.PIPE,
close_fds=True)
except OSError as e:
LOG.error("Pipe2 failed - %s ", e)
raise