diff --git a/contrib/chg/chg.c b/contrib/chg/chg.c --- a/contrib/chg/chg.c +++ b/contrib/chg/chg.c @@ -189,7 +189,7 @@ static void execcmdserver(const struct c "--cwd", "/", "--cmdserver", "chgunix", "--address", opts->sockname, - "--daemon-pipefds", opts->lockfile, + "--daemon-postexec", opts->lockfile, "--pid-file", opts->pidfile, "--config", "extensions.chgserver=", /* wrap root ui so that it can be disabled/enabled by config */ diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -758,14 +758,14 @@ def service(opts, parentfn=None, initfn= fp.write(str(pid) + '\n') fp.close() - if opts['daemon'] and not opts['daemon_pipefds']: + if opts['daemon'] and not opts['daemon_postexec']: # Signal child process startup with file removal lockfd, lockpath = tempfile.mkstemp(prefix='hg-service-') os.close(lockfd) try: if not runargs: runargs = util.hgcmd() + sys.argv[1:] - runargs.append('--daemon-pipefds=%s' % lockpath) + runargs.append('--daemon-postexec=%s' % lockpath) # Don't pass --cwd to the child process, because we've already # changed directory. for i in xrange(1, len(runargs)): @@ -798,8 +798,8 @@ def service(opts, parentfn=None, initfn= if not opts['daemon']: writepid(util.getpid()) - if opts['daemon_pipefds']: - lockpath = opts['daemon_pipefds'] + if opts['daemon_postexec']: + lockpath = opts['daemon_postexec'] try: os.setsid() except AttributeError: diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -6208,7 +6208,7 @@ def root(ui, repo): [('A', 'accesslog', '', _('name of access log file to write to'), _('FILE')), ('d', 'daemon', None, _('run server in background')), - ('', 'daemon-pipefds', '', _('used internally by daemon mode'), _('FILE')), + ('', 'daemon-postexec', '', _('used internally by daemon mode')), ('E', 'errorlog', '', _('name of error log file to write to'), _('FILE')), # use string type, then we can check if something was passed ('p', 'port', '', _('port to listen on (default: 8000)'), _('PORT')), diff --git a/tests/dumbhttp.py b/tests/dumbhttp.py --- a/tests/dumbhttp.py +++ b/tests/dumbhttp.py @@ -38,7 +38,7 @@ if __name__ == '__main__': parser.add_option('-f', '--foreground', dest='foreground', action='store_true', help='do not start the HTTP server in the background') - parser.add_option('--daemon-pipefds') + parser.add_option('--daemon-postexec') (options, args) = parser.parse_args() @@ -49,7 +49,7 @@ if __name__ == '__main__': opts = {'pid_file': options.pid, 'daemon': not options.foreground, - 'daemon_pipefds': options.daemon_pipefds} + 'daemon_postexec': options.daemon_postexec} service = simplehttpservice(options.host, options.port) cmdutil.service(opts, initfn=service.init, runfn=service.run, runargs=[sys.executable, __file__] + sys.argv[1:]) diff --git a/tests/test-completion.t b/tests/test-completion.t --- a/tests/test-completion.t +++ b/tests/test-completion.t @@ -158,7 +158,7 @@ Show the options for the "serve" command --config --cwd --daemon - --daemon-pipefds + --daemon-postexec --debug --debugger --encoding @@ -218,7 +218,7 @@ Show all commands + options pull: update, force, rev, bookmark, branch, ssh, remotecmd, insecure push: force, rev, bookmark, branch, new-branch, ssh, remotecmd, insecure remove: after, force, subrepos, include, exclude - serve: accesslog, daemon, daemon-pipefds, errorlog, port, address, prefix, name, web-conf, webdir-conf, pid-file, stdio, cmdserver, templates, style, ipv6, certificate + serve: accesslog, daemon, daemon-postexec, errorlog, port, address, prefix, name, web-conf, webdir-conf, pid-file, stdio, cmdserver, templates, style, ipv6, certificate status: all, modified, added, removed, deleted, clean, unknown, ignored, no-status, copies, print0, rev, change, include, exclude, subrepos, template summary: remote update: clean, check, date, rev, tool