[gamin] Startup race?



Hi,

Playing a bit with the very stupid command line client mentioned in my mail
in Oct 06, I found this strange behavior:

When gam_server is not yet running, launcing "./monitor /etc" sometimes
starts up correctly, but sometimes exits with a "Connection refused"
message. However, this leaves gam_server running in the background, and a
subsequent attept to launch "./monitor /etc" always succeeds as long as I
keep gam_server running. When I kill it, the story starts from the
beginning.

Is there maybe a race condition in the code that starts the daemon? I guess
it fork+exec's gam_server and then tries to connect to it, but sometimes
gam_server is not yet accepting connections by this time. May this be the
case?


-- 
Egmont



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]