[ 
https://issues.apache.org/jira/browse/QPID-304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alan Conway updated QPID-304:
-----------------------------

        Fix Version/s: M2
    Affects Version/s:     (was: M2)
                       M1

> qpidd --daemon should not return until broker has started.
> ----------------------------------------------------------
>
>                 Key: QPID-304
>                 URL: https://issues.apache.org/jira/browse/QPID-304
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: M1
>            Reporter: Alan Conway
>             Fix For: M2
>
>
> Running qpidd --daemon followed immediately by a client sometimes fails 
> becaue the background qpidd has not yet started accept()ing connections.
> To fix this the, foreground qpidd process (which forks the background one 
> with --daemon)  should not return until the background qpidd is accepting 
> connections.
> There are several ways to implement this. One is for the foreground qpidd to 
> set up some inter-process communication (pipe, semaphore, whatever) and wait 
> to be notified, the background qpidd would notify after calling accept() . 
> Alternatively the foreground qpidd could repeatedly try to connect until it 
> is succssful.
> Whatever the approach be careful that the foreground qpidd returns with zero 
> status only if the background daemon starts listening, and returns with 
> non-zero exit status if the background  process fails for any reason. Under 
> no circumstance should the foreground process hang forever. If the background 
> qpidd does not start accepting within some reasonable delay (a minute or so) 
> the foreground process should kill it and return non-zero status.
> Once implemented, go thru all tests and remove arbitrary sleeps introduced to 
> work around this problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to