How to stop server (hg serve) ?

TK Soh teekaysoh at gmail.com
Mon Nov 2 18:24:23 CST 2009


On Sun, Nov 1, 2009 at 11:18 PM, Benoit Boissinot
<benoit.boissinot at ens-lyon.org> wrote:
> 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`.

VNC provides a -kill option to handle the termination of a VNC
session. Basically it's doing a kill on pid, but I always feel eerie
about the kill commands.

>>
>> 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).

Again to borrow some idea from VNC. VNC maintain the pid files in
user's $HOME/.vnc directory.

> regards,
>
> Benoit
>
> --
> :wq
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
>


More information about the Mercurial mailing list