On Thu, Feb 16, 2006 at 09:52:24PM +1300, Matt Brown wrote: > On Wed, 2006-02-15 at 15:14 +0100, Javier Fernández-Sanguino Peña wrote: > The patch is now back down to the size/scope that I consider appropriate > for a NMU, I agree that the previous patch was getting a little unwieldy > and rough, my apologies.
Looks much better. Although I consider file locking to be unnecesary, few daemons lock their pidfiles IIRC. But I guess it doesn't hurt. > > Would you mind looking up how daemon() does this and maybe implement a > > similar solution? > > Please see the attached patch. That one is cleaner and looks better. If you have tested that it works fine go ahead with the NMU, as for testing you should test if the pidfile is consistent in the following situations: - run 'portreserve start' twice, check # of portreserve instances. Stop port reserve. - run 'portreserve start' once, run 'portreserve', check # of instances and pidfile contents. Stop port reserve. There are other situations which could be tested out and which, I believe, the init.d script does not cover (like creating a stale pidfile when portreserve is not running, stopping portreseve and trying to start it again). Thanks for working on this, hope you don't mind my nit-picking. Javier
signature.asc
Description: Digital signature