[PATCH] CONFIG_PID_FILE_PATH: new configuration option for pidfile paths

Tito farmatito at tiscali.it
Tue Dec 11 06:58:09 UTC 2012


On Tuesday 11 December 2012 02:25:46 Mike Frysinger wrote:
> On Monday 10 December 2012 14:49:39 Anthony G. Basile wrote:
> > --- a/miscutils/watchdog.c
> > +++ b/miscutils/watchdog.c
> > 
> > +	remove_pidfile(CONFIG_PID_FILE_PATH"/watchdog.pid");
> 
> stylewise, there should be a space before the first "
> 
> i wonder if we should add a helper that takes a name and it takes care of 
> putting that in via "/var/run/%.pid"

Hi,
CONFIG_PID_FILE_PATH could be moved  inside write/remove_pidfile,
but we loose the ability to use a different path for a single applet
so maybe the proposed patch is better.
I would add some 

if (ENABLE_FEATURE_PIDFILE) 

in front of all this calls to show clearly that this calls
are turned on and off by a config option and thus make the code
more readable. This would be dead code optimized away
by the compiler.

Ciao,
Tito

> if there are no complaints, i'll merge this in a bit
> -mike
> 


More information about the busybox mailing list