is setsockopt SO_NOSIGPIPE work?
Anton Yuzhaninov
citrin at citrin.ru
Thu Mar 1 16:47:43 UTC 2007
Thursday, March 1, 2007, 6:29:42 PM, Ruslan Ermilov wrote:
RE> On Thu, Mar 01, 2007 at 03:17:29PM +0300, Anton Yuzhaninov wrote:
>> Is SO_NOSIGPIPE work?
>>
>> It try to set on socket option SO_NOSIGPIPE but anyway process
>> received sigpipe.
>>
RE> It works, but only if you use send() instead of write().
RE> Alternatively, you can control the behavior on a per
RE> message basis, by passing the MSG_NOSIGNAL in the "flags"
RE> argument to the send() call (without having to set a
RE> socket option).
Thanks, with send() it works fine.
I think it should be documented in setsockopt(2).
--
WBR, Anton Yuzhaninov
More information about the freebsd-net
mailing list