1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

Add close_fds=True in ifupdownbase class

Ticket: CM-2899
Reviewed By:
Testing Done: Tested ifupdown sanity

Just closing all the places where we could leak fds.
This commit is contained in:
Roopa Prabhu
2014-06-03 11:11:47 -07:00
parent 51a8099130
commit 068a729037

View File

@ -29,7 +29,8 @@ class ifupdownBase(object):
ch = subprocess.Popen(cmd.split(),
stdout=subprocess.PIPE,
shell=False, env=cmdenv,
stderr=subprocess.STDOUT)
stderr=subprocess.STDOUT,
close_fds=True)
cmdout = ch.communicate()[0]
cmd_returncode = ch.wait()
except OSError, e: