qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Conway (JIRA)" <qpid-...@incubator.apache.org>
Subject [jira] Created: (QPID-304) qpidd --daemon should not return until broker has started.
Date Thu, 18 Jan 2007 14:37:29 GMT
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
            Reporter: Alan Conway

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.
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message