[PATCH] CONFIG_PID_FILE_PATH: new configuration option for pidfile paths

Anthony G. Basile basile at opensource.dyc.edu
Tue Dec 11 12:18:57 UTC 2012


On 12/11/2012 01:58 AM, Tito wrote:
> 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.

That logic is already there in include/libbb.h where it properly 
includes WANT_PIDFILE as well.  This is not subtle code that the reader 
won't see.

>
> Ciao,
> Tito
>
>> if there are no complaints, i'll merge this in a bit
>> -mike
>>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox


-- 
Anthony G. Basile, Ph. D.
Chair of Information Technology
D'Youville College
Buffalo, NY 14201
(716) 829-8197


More information about the busybox mailing list