summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2011-12-03 12:41:34 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2011-12-03 12:41:34 +0000
commit9a9f7b700815cedc986e4ae9e93394dc95c8e70a (patch)
tree3c79d2b645191e24a866a41894521d63b5885b52
parent81b1a587746eace9605fc22c53206a649ac474f9 (diff)
document MSG_NOSIGNAL.
-rw-r--r--lib/libc/sys/send.227
1 files changed, 21 insertions, 6 deletions
diff --git a/lib/libc/sys/send.2 b/lib/libc/sys/send.2
index 705e2b2f7b2..8f6cf8c8b98 100644
--- a/lib/libc/sys/send.2
+++ b/lib/libc/sys/send.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: send.2,v 1.23 2007/05/31 19:19:33 jmc Exp $
+.\" $OpenBSD: send.2,v 1.24 2011/12/03 12:41:33 fgsch Exp $
.\" $NetBSD: send.2,v 1.6 1996/01/15 01:17:18 thorpej Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)send.2 8.2 (Berkeley) 2/21/94
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: December 3 2011 $
.Dt SEND 2
.Os
.Sh NAME
@@ -94,10 +94,16 @@ send more data.
The
.Fa flags
parameter may include one or more of the following:
-.Bd -literal
-#define MSG_OOB 0x1 /* process out-of-band data */
-#define MSG_DONTROUTE 0x4 /* bypass routing, use direct interface */
-.Ed
+.Pp
+.Bl -tag -width "MSG_DONTROUTEXX" -offset indent -compact
+.It Dv MSG_OOB
+process out-of-band data
+.It Dv MSG_DONTROUTE
+bypass routing, use direct interface
+.It Dv MSG_NOSIGNAL
+don't send
+.Dv SIGPIPE
+.El
.Pp
The flag
.Dv MSG_OOB
@@ -110,6 +116,11 @@ the underlying protocol must also support
data.
.Dv MSG_DONTROUTE
is usually used only by diagnostic or routing programs.
+.Dv MSG_NOSIGNAL
+is used to request not to send the
+.Dv SIGPIPE
+signal if an attempt to send is made on a socket that is shut down for
+writing or no longer connected.
.Pp
See
.Xr recv 2
@@ -172,6 +183,10 @@ This error can only be returned by connected sockets.
The socket is not connected, and no destination address was specified.
.It Bq Er EISCONN
The socket is already connected, and a destination address was specified.
+.It Bq Er EPIPE
+The socket is shut down for writing or not longer connected and the
+.Dv MSG_NOSIGNAL
+flag is set.
.El
.Pp
In addition,