diff --git a/hgext/logtoprocess.py b/hgext/logtoprocess.py --- a/hgext/logtoprocess.py +++ b/hgext/logtoprocess.py @@ -58,14 +58,14 @@ DETACHED_PROCESS = 0x00000008 _creationflags = DETACHED_PROCESS | subprocess.CREATE_NEW_PROCESS_GROUP - def runshellcommand(script, env): + def runshellcommand(script, env, ui): # we can't use close_fds *and* redirect stdin. I'm not sure that we # need to because the detached process has no console connection. subprocess.Popen( script, shell=True, env=env, close_fds=True, creationflags=_creationflags) else: - def runshellcommand(script, env): + def runshellcommand(script, env, ui): # double-fork to completely detach from the parent process # based on http://code.activestate.com/recipes/278731 pid = os.fork() @@ -124,7 +124,7 @@ env = dict(itertools.chain(encoding.environ.items(), msgpairs, optpairs), EVENT=event, HGPID=str(os.getpid())) - runshellcommand(script, env) + runshellcommand(script, env, self) return super(logtoprocessui, self).log(event, *msg, **opts) # Replace the class for this instance and all clones created from it: