From f67b7b8d4cffb2612609ecbca47fc3d9e1d65d8a Mon Sep 17 00:00:00 2001 From: Sebastian Wiedenroth Date: Wed, 14 Jun 2017 15:35:56 +0200 Subject: 8409 Want MSG_NOSIGNAL to prevent SIGPIPE Reviewed by: Toomas Soome Reviewed by: Youzhong Yang Reviewed by: Dan McDonald Reviewed by: Patrick Mooney Reviewed by: Robert Mustacchi Reviewed by: Garrett D'Amore Approved by: Gordon Ross --- usr/src/man/man3socket/send.3socket | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'usr/src/man/man3socket/send.3socket') diff --git a/usr/src/man/man3socket/send.3socket b/usr/src/man/man3socket/send.3socket index 2e7d1a51b5..e50e8a5492 100644 --- a/usr/src/man/man3socket/send.3socket +++ b/usr/src/man/man3socket/send.3socket @@ -4,7 +4,7 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH SEND 3SOCKET "April 9, 2016" +.TH SEND 3SOCKET "Jun 18, 2017" .SH NAME send, sendto, sendmsg \- send a message from a socket .SH SYNOPSIS @@ -81,6 +81,16 @@ The \fBSO_DONTROUTE\fR option is turned on for the duration of the operation. It is used only by diagnostic or routing programs. .RE +.sp +.ne 2 +.na +\fB\fBMSG_NOSIGNAL\fR\fR +.ad +.RS 17n +Don't generate the \fBSIGPIPE\fR signal when a stream-oriented socket is no +longer connected. +.RE + .sp .LP See \fBrecv\fR(3SOCKET) for a description of the \fBmsghdr\fR structure. @@ -252,7 +262,8 @@ The \fBsend()\fR function returns errors under the following conditions: .RS 9n The socket is shut down for writing, or the socket is connection-mode and is no longer connected. In the latter case, if the socket is of type -\fBSOCK_STREAM\fR, the \fBSIGPIPE\fR signal is generated to the calling thread. +\fBSOCK_STREAM\fR, the \fBSIGPIPE\fR signal is generated to the calling thread +unless the \fB\fBMSG_NOSIGNAL\fR flag is set. .RE .SH ATTRIBUTES -- cgit v1.2.3