equal
deleted
inserted
replaced
825 |
825 |
826 if not opts['daemon']: |
826 if not opts['daemon']: |
827 writepid(util.getpid()) |
827 writepid(util.getpid()) |
828 |
828 |
829 if opts['daemon_postexec']: |
829 if opts['daemon_postexec']: |
830 inst = opts['daemon_postexec'] |
|
831 try: |
830 try: |
832 os.setsid() |
831 os.setsid() |
833 except AttributeError: |
832 except AttributeError: |
834 pass |
833 pass |
835 if inst.startswith('unlink:'): |
834 for inst in opts['daemon_postexec']: |
836 lockpath = inst[7:] |
835 if inst.startswith('unlink:'): |
837 os.unlink(lockpath) |
836 lockpath = inst[7:] |
838 elif inst != 'none': |
837 os.unlink(lockpath) |
839 raise error.Abort(_('invalid value for --daemon-postexec')) |
838 elif inst != 'none': |
|
839 raise error.Abort(_('invalid value for --daemon-postexec: %s') |
|
840 % inst) |
840 util.hidewindow() |
841 util.hidewindow() |
841 sys.stdout.flush() |
842 sys.stdout.flush() |
842 sys.stderr.flush() |
843 sys.stderr.flush() |
843 |
844 |
844 nullfd = os.open(os.devnull, os.O_RDWR) |
845 nullfd = os.open(os.devnull, os.O_RDWR) |