mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-25 01:04:05 +00:00
5ac62ebb51
The install monitor holds the later connections for a node whose handler is still running, and forks the next one when it reaps that handler. SIGCHLD is what brings the parent back to look: it interrupts the accept. A handler can exit after the parent checks its queue and before the accept begins. The signal is then handled where there is no accept to interrupt, and the parent blocks in accept with a connection already queued and ready to run. That connection waits until some other node calls in. A single node retrying on its own waits until it times out. do_installm_service now waits through wait_for_installm_connection, which selects on the listening socket. The wait is bounded by $installm_wakeup_seconds while connections are queued, so the parent looks at its queue again instead of waiting for another client. An idle monitor with an empty queue still waits without a bound, because a handler that exits then leaves nothing to do. The new case asserts the wait ends on its own bound with nothing to accept, and ends at once when a connection is already there. It fails when the bound is ignored. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>