Index: lib/libc/sys/send.2 =================================================================== --- lib/libc/sys/send.2 +++ lib/libc/sys/send.2 @@ -122,6 +122,7 @@ #define MSG_OOB 0x00001 /* process out-of-band data */ #define MSG_DONTROUTE 0x00004 /* bypass routing, use direct interface */ #define MSG_EOR 0x00008 /* data completes record */ +#define MSG_DONTWAIT 0x00080 /* this message should be nonblocking */ #define MSG_EOF 0x00100 /* data completes transaction */ #define MSG_NOSIGNAL 0x20000 /* do not generate SIGPIPE on EOF */ .Ed Index: sys/kern/uipc_socket.c =================================================================== --- sys/kern/uipc_socket.c +++ sys/kern/uipc_socket.c @@ -1522,7 +1522,7 @@ } if (space < resid + clen && (atomic || space < so->so_snd.sb_lowat || space < clen)) { - if ((so->so_state & SS_NBIO) || (flags & MSG_NBIO)) { + if ((so->so_state & SS_NBIO) || (flags & MSG_NBIO) || (flags & MSG_DONTWAIT)) { SOCKBUF_UNLOCK(&so->so_snd); error = EWOULDBLOCK; goto release;