Alan Conway <[EMAIL PROTECTED]> wrote:
> On Tue, 2007-01-16 at 11:29 -0500, Alan Conway wrote:
>> Waiting for startup is a classic problem, we need a good general
>> solution. How about
>> qpidd --waitforbroker <timeout>
>>   Attempt to contact the broker for up to <timeout> seconds. Exit status
>> 0 if the broker was contacted, 1 if the timeout expired.
>
> A better solution: have qpidd --daemon itself wait until it has started
> successfully! We could create a shared semaphore or somesuch before we
> fork the daemon, and have the daemon process signal when it has
> successfully called accept(). That way you can always safely start a
> client immediately after starting qpidd --daemon.

I prefer the former, since it would be useful not just at start-up --
e.g., also to test whether a broker (or something) is listening on the
specified port at any later time.

Reply via email to