fixes with independent process spawning

This commit is contained in:
Mario Voigt 2021-05-20 14:38:01 +02:00
parent e02bfadbca
commit 2d0448e913
2 changed files with 2 additions and 8 deletions

View File

@ -6,7 +6,6 @@ import shutil
import os
import sys
import warnings
import shlex
"""
Extension for InkScape 1.X
@ -41,9 +40,7 @@ class AnimateOrder (inkex.EffectExtension):
if os.name == 'nt':
subprocess.Popen(args, close_fds=True, creationflags=DETACHED_PROCESS)
else:
cmd = "nohup " + " ".join(args) + " &"
cmds = shlex.split(cmd)
subprocess.Popen(cmds, start_new_session=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
subprocess.Popen(args, start_new_session=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
warnings.simplefilter("default", ResourceWarning)
def add_arguments(self, pars):

View File

@ -8,7 +8,6 @@ import os
import sys
import subprocess
from subprocess import Popen, PIPE
import shlex
import warnings
import inkex
import inkex.command
@ -47,9 +46,7 @@ class ExportObject(inkex.EffectExtension):
if os.name == 'nt':
Popen(["inkscape", file], close_fds=True, creationflags=DETACHED_PROCESS)
else:
cmd = "nohup inkscape " + file + " &"
cmds = shlex.split(cmd)
subprocess.Popen(cmds, start_new_session=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
subprocess.Popen(["inkscape", file], start_new_session=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
warnings.simplefilter("default", ResourceWarning)
def effect(self):