mercurial/utils/procutil.py
branchstable
changeset 53034 7a4772e92f23
parent 52640 24ee91ba9aa8
equal deleted inserted replaced
53032:c3e450bfdf34 53034:7a4772e92f23
   741             if isinstance(cmd, bytes):
   741             if isinstance(cmd, bytes):
   742                 cmd = [cmd]
   742                 cmd = [cmd]
   743             script = b' '.join(shellquote(x) for x in cmd)
   743             script = b' '.join(shellquote(x) for x in cmd)
   744         if record_wait is None:
   744         if record_wait is None:
   745             # double-fork to completely detach from the parent process
   745             # double-fork to completely detach from the parent process
   746             script = b'( %s ) &' % script
   746             script = b'( ( %s ) <&3 3<&- &) 3<&0' % script
   747             start_new_session = True
   747             start_new_session = True
   748         else:
   748         else:
   749             start_new_session = False
   749             start_new_session = False
   750             ensurestart = True
   750             ensurestart = True
   751 
   751