[Nut-upsdev] infinite loop in clients/upsclient.c connect
Charles Lepple
clepple at gmail.com
Mon Mar 12 03:16:01 CET 2007
I was testing some code for listing available UPSes, and when I tried
connecting to a machine that didn't have upsd running, upsc went into
an infinite loop on OS X (IPv6 enabled).
The error code returned by connect is EINVAL, which apparently isn't
one of the errors documented in connect(2) here.
http://boxster.ghz.cc/projects/nut/changeset/731
http://boxster.ghz.cc/projects/nut/browser/trunk/clients/upsclient.c?rev=731#L540
I'm not sure about the logic inside the switch statement in general,
actually. If the error is EAFNOSUPPORT, I would think we would need
more than just to break out of the switch statement. Also, EINTR is
most likely going to be generated by a signal, and the only unmasked
signal that we can reasonably expect is SIGINT (which *should*
terminate upsc).
--
- Charles Lepple
More information about the Nut-upsdev
mailing list