Does anyone use nscd?

Artem Belevich art at freebsd.org
Wed Oct 5 22:54:01 UTC 2011


2011/10/5 Dag-Erling Smørgrav <des at des.no>:
> Michael Bushkov <bushman at freebsd.org> writes:
>> 2. Consequences of the aforementioned problem can probably be
>> corrected by using _setsockopt(..., SO_NOSIGPIPE) in
>> __open_cached_connection() in nscachedcli.c
>
> That sounds like a workaround rather than a fix...

Not necessarily. Using SO_NOSIGPIPE is a valid option when someone
wants to see read/write on a closed socket fail and return -1 with
errno=EPIPE.

Quick grep in libc shows that resolver code in
lib/libc/resolv/res_send.c also sets SO_NOSIGPIPE for exactly that
reason.

--Artem


More information about the freebsd-hackers mailing list