[Nut-upsdev] MSG_NOSIGNAL does not exist in OS X

Arjen de Korte nut+devel at de-korte.org
Sun Feb 10 20:06:37 UTC 2008

> I'm seeing an error with the XML/HTTP driver in NUT:


> What is the side effect of not using MSG_NOSIGNAL? I could just
> #define it to 0, but I don't know if this would cause any problems.

The MSG_NOSIGNAL prevents send() from sending the SIGPIPE signal in case
the connection is broken and instead it will only return errno EPIPE. In
NUT drivers, there is no difference, since we ignore this signal (through
setup_signals() in 'main.c') anyway.

Since MSG_NOSIGNAL is not POSIX compliant, it should not be used. I've
volunteered to work on this, so this will be fixed when the 'libtcp' (I'm
open to suggestions for better names) I'm working on is ready. It will
have a similar interface as the ser_* functions we already have in
'serial.c' (now you also know where my recent changes originate from).

Best regards, Arjen
Eindhoven - The Netherlands
Key fingerprint - 66 4E 03 2C 9D B5 CB 9B  7A FE 7E C1 EE 88 BC 57

More information about the Nut-upsdev mailing list