[PATCH STABLE] test-push-http: do not clear pid file

Yuya Nishihara yuya at tcha.org
Fri Apr 27 07:11:58 EDT 2018


On Thu, 26 Apr 2018 10:27:32 -0700, Gregory Szorc wrote:
> > On Apr 26, 2018, at 10:17, Augie Fackler <raf at durin42.com> wrote:
> >> On Apr 26, 2018, at 08:34, Yuya Nishihara <yuya at tcha.org> wrote:
> >> 
> >> # HG changeset patch
> >> # User Yuya Nishihara <yuya at tcha.org>
> >> # Date 1524744656 -32400
> >> #      Thu Apr 26 21:10:56 2018 +0900
> >> # Branch stable
> >> # Node ID 7dffecb148aa77184b19c054e301345b3b51af1b
> >> # Parent  da07c781aba9ef88cbf76d07c6a6e2ec40cf6693
> >> test-push-http: do not clear pid file
> > 
> > queued, thanks
> 
> Oops. Sorry about the oversight. I usually call killdaemons.py liberally and then overwrite the pids file since leaving a reference to a killed pid would be problematic if there were a future pid collision.

Maybe killdaemons.py should do killdaemons(remove=True) by default?

FWIW, it might cause a problem on Windows to kill and start new daemon
frequently because SO_REUSEADDR is off.

> I do wonder if we should add functionality to the test harness so ‘hg serve -d’ automagically updates a pid file and killdaemons.py nukes the pid file so we don’t have to do all this management. Strangely, killdaemons.py has the remove file functionality but it isn’t used AFAICT.

Sounds nice.


More information about the Mercurial-devel mailing list