Skip to content

Commit

Permalink
wait for process to finish
Browse files Browse the repository at this point in the history
  • Loading branch information
brad committed May 25, 2015
1 parent c58fae6 commit ddfd15f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions inkinkex.py
Expand Up @@ -61,10 +61,11 @@
import inkutils

import os
import subprocess
import sys
import tempfile

from subprocess import Popen, PIPE


class InkEffect(inkex.Effect):

Expand Down Expand Up @@ -158,7 +159,11 @@ def effect(self):
cmd += self.select_verb(tid, tverb, tid and tverb)
cmd += " --verb=FileSave --verb=FileQuit"

p = subprocess.Popen(cmd, shell=True, preexec_fn=os.setsid)
p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)

rc = p.wait()
out = p.stdout.read()
err = p.stderr.read()

self.parse(tmp)
self.getposinlayer()
Expand Down

0 comments on commit ddfd15f

Please sign in to comment.