How to stop server (hg serve) ?
Alexander Schatten
ml_alexanderschatten at gmx.at
Mon Nov 2 04:28:37 CST 2009
Thanks for the hint
the --pid-file option seems not to work under OS X. I tried it out, but the process is alway called "Python"... Not ideal.
However, by such reasons, in my opinion, it is a rather strange concept for a server to rely on underlying OS functions for "shutdown". Think of servers like Tomcat; there should be, at least in my opinion, always a command to start and stop.
thanks
Alex
-------- Original-Nachricht --------
> Datum: Mon, 2 Nov 2009 00:18:13 +0100
> Von: Benoit Boissinot <benoit.boissinot at ens-lyon.org>
> An: Alexander Schatten <ml_alexanderschatten at gmx.at>
> CC: mercurial at selenic.com
> Betreff: Re: How to stop server (hg serve) ?
> On Sun, Nov 01, 2009 at 09:56:14PM +0100, Alexander Schatten wrote:
> > I am occasionally using hg serve; however I found no way to terminate
> > the server.
> >
> > If I start it in foreground, I can terminate the shell, which stops
> > the server (OS X, btw). But when I start it with
> >
> > hg serve -d
> >
> > in demon mode, there seems to be no way to stop the server without
> > rebooting or killing the job from the terminal; but I could not find
> > the job (unfortunately there are a lot of jobs running in OS X...)
>
> I think the right way is to use --pid-file and kill `cat /path/to/pid`.
>
> >
> > So to conclude: is there a reason, why there is no
> >
> > hg serve --stop
> >
> > or
> >
> > hg serve --shutdown
> >
> > command?
>
> I don't think there is a standard place to place the pid file, that's
> why. (it could be in /var/something but it usually isn't user writable
> anyway).
>
> regards,
>
> Benoit
>
> --
> :wq
More information about the Mercurial
mailing list