Make MSG_NOSIGNAL available to native programs.

Bump FreeBSD_version to note this change.

Reviewed by: sobomax
This commit is contained in:
Alfred Perlstein 2005-03-09 00:17:33 +00:00
parent c1b677aa80
commit d025278aa1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=143308
3 changed files with 13 additions and 7 deletions

View File

@ -103,11 +103,12 @@ The
.Fa flags
argument may include one or more of the following:
.Bd -literal
#define MSG_OOB 0x1 /* process out-of-band data */
#define MSG_PEEK 0x2 /* peek at incoming message */
#define MSG_DONTROUTE 0x4 /* bypass routing, use direct interface */
#define MSG_EOR 0x8 /* data completes record */
#define MSG_EOF 0x100 /* data completes transaction */
#define MSG_OOB 0x00001 /* process out-of-band data */
#define MSG_PEEK 0x00002 /* peek at incoming message */
#define MSG_DONTROUTE 0x00004 /* bypass routing, use direct interface */
#define MSG_EOR 0x00008 /* data completes record */
#define MSG_EOF 0x00100 /* data completes transaction */
#define MSG_NOSIGNAL 0x20000 /* do not generate SIGPIPE on EOF */
.Ed
.Pp
The flag
@ -135,6 +136,9 @@ protocol family, and is used to implement Transaction
.Xr ttcp 4 ) .
.Dv MSG_DONTROUTE
is usually used only by diagnostic or routing programs.
.Dv MSG_NOSIGNAL
is used to prevent SIGPIPE generation when writing a socket that
may be closed.
.Pp
See
.Xr recv 2

View File

@ -57,7 +57,7 @@
* is created, otherwise 1.
*/
#undef __FreeBSD_version
#define __FreeBSD_version 600019 /* Master, propagated to newvers */
#define __FreeBSD_version 600020 /* Master, propagated to newvers */
#ifndef LOCORE
#include <sys/types.h>

View File

@ -398,7 +398,9 @@ struct msghdr {
#endif
#ifdef _KERNEL
#define MSG_SOCALLBCK 0x10000 /* for use by socket callbacks - soreceive (TCP) */
#define MSG_NOSIGNAL 0x20000 /* for use with emulation layers */
#endif
#if __BSD_VISIBLE
#define MSG_NOSIGNAL 0x20000 /* do not generate SIGPIPE on EOF */
#endif
/*