On 30 May 2012 06:26, Willy Tarreau <[email protected]> wrote:
> On Wed, May 23, 2012 at 09:08:15AM -0400, Chad Gatesman wrote:
>> Is there a major reason the -p option to generate a pid file is ignored
>> when running haproxy the foreground (e.g. using -db)?  It would be nice if
>> this file was still generated when specified--even in foreground mode.
>> Could this be something that could be changed in a future releases?
>
> No it's not planned because all -dXXX are mainly debugging/development
> switches. -db is used all the time during development since it allows
> one to stop haproxy by a simple Ctrl-C. This is the only way I start it
> when developing or troubleshooting configs. Having haproxy fail to start
> because of an unwritable directory to write the pid file would be really
> annoying.
>
> I really don't understand why this would be useful to you. A pid file makes
> sense for a background process since it saves you from searching it. But a
> foreground process, what's the purpose ? Normally you're supposed to stop
> it using Ctrl-C, so I fail to catch your use case.

I believe there are some init replacements / supervisor daemons that
work best with non-daemonising processes. But why they might then
require separate confirmation of their child PIDs, I don't know.

Chad - is that what you're using? If so, do remember that -db doesn't
result in multiple processes being spawned, so you don't need to be
notified of multiple PIDs in non-daemon mode - it's just the parent's
single child that needs to be monitored.

Jonathan
-- 
Jonathan Matthews
Oxford, London, UK
http://www.jpluscplusm.com/contact.html

Reply via email to