How to stop server (hg serve) ?

Benoit Boissinot benoit.boissinot at ens-lyon.org
Sun Nov 1 17:18:13 CST 2009


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