Commit db1f6bfa authored by Gabriel Monnerat's avatar Gabriel Monnerat

add parameter to close all file descriptors before execute the child process

parent 5d9c2045
...@@ -55,6 +55,7 @@ class Handler(object): ...@@ -55,6 +55,7 @@ class Handler(object):
stdout, stderr = Popen(command, stdout, stderr = Popen(command,
stdout=PIPE, stdout=PIPE,
stderr=PIPE, stderr=PIPE,
close_fds=True,
env=self.environment).communicate() env=self.environment).communicate()
self.file.reload(output_url) self.file.reload(output_url)
try: try:
...@@ -70,6 +71,7 @@ class Handler(object): ...@@ -70,6 +71,7 @@ class Handler(object):
stdout, stderr = Popen(command, stdout, stderr = Popen(command,
stdout=PIPE, stdout=PIPE,
stderr=PIPE, stderr=PIPE,
close_fds=True,
env=self.environment).communicate() env=self.environment).communicate()
self.file.trash() self.file.trash()
metadata_dict = {} metadata_dict = {}
......
...@@ -54,6 +54,7 @@ class Handler(object): ...@@ -54,6 +54,7 @@ class Handler(object):
stdout, stderr = Popen(command, stdout, stderr = Popen(command,
stdout=PIPE, stdout=PIPE,
stderr=PIPE, stderr=PIPE,
close_fds=True,
env=self.environment).communicate() env=self.environment).communicate()
self.document.reload(output_url) self.document.reload(output_url)
try: try:
...@@ -69,6 +70,7 @@ class Handler(object): ...@@ -69,6 +70,7 @@ class Handler(object):
stdout, stderr = Popen(command, stdout, stderr = Popen(command,
stdout=PIPE, stdout=PIPE,
stderr=PIPE, stderr=PIPE,
close_fds=True,
env=self.environment).communicate() env=self.environment).communicate()
info_list = filter(None, stdout.split("\n")) info_list = filter(None, stdout.split("\n"))
metadata = {} metadata = {}
...@@ -106,6 +108,7 @@ class Handler(object): ...@@ -106,6 +108,7 @@ class Handler(object):
stdout, stderr = Popen(command, stdout, stderr = Popen(command,
stdout=PIPE, stdout=PIPE,
stderr=PIPE, stderr=PIPE,
close_fds=True,
env=self.environment).communicate() env=self.environment).communicate()
self.document.reload(output_url) self.document.reload(output_url)
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment