is setsockopt SO_NOSIGPIPE work?

Ruslan Ermilov ru at freebsd.org
Thu Mar 1 15:57:10 UTC 2007


Hi Anton,

On Thu, Mar 01, 2007 at 03:17:29PM +0300, Anton Yuzhaninov wrote:
> Hello.
> 
> Is SO_NOSIGPIPE work?
> 
> It try to set on socket option SO_NOSIGPIPE but anyway process
> received sigpipe.
> 
It works, but only if you use send() instead of write().
Alternatively, you can control the behavior on a per
message basis, by passing the MSG_NOSIGNAL in the "flags"
argument to the send() call (without having to set a
socket option).


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20070301/1467befb/attachment.pgp


More information about the freebsd-net mailing list