avoid passing open network connections to subprocesses, call Popen with close_fds=True
This commit is contained in:
parent
d5450840ad
commit
72d9dbf0f2
7 changed files with 24 additions and 20 deletions
|
|
@ -271,7 +271,7 @@ class Edit(models.Model):
|
|||
'-f', ','.join(frames),
|
||||
'-o', icon
|
||||
]
|
||||
p = subprocess.Popen(cmd)
|
||||
p = subprocess.Popen(cmd, close_fds=True)
|
||||
p.wait()
|
||||
self.save()
|
||||
|
||||
|
|
@ -355,12 +355,12 @@ class Edit(models.Model):
|
|||
'-ss', data['in'], '-t', data['out'],
|
||||
'-vcodec', 'copy', '-acodec', 'copy',
|
||||
clips[-1]]
|
||||
#p = subprocess.Popen(cmd)
|
||||
#p = subprocess.Popen(cmd, close_fds=True)
|
||||
#p.wait()
|
||||
cmd = ['mkvmerge', clips[0]] \
|
||||
+ ['+'+c for c in clips[1:]] \
|
||||
+ [os.path.join(tmp, 'render.webm')]
|
||||
#p = subprocess.Popen(cmd)
|
||||
#p = subprocess.Popen(cmd, close_fds=True)
|
||||
#p.wait()
|
||||
shutil.rmtree(tmp)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue