Print this page
3769 Implement SOCK_NONBLOCK flag to socket()
Reviewed-by: Robert Mustacchi <rm@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man3socket/socket.3socket
          +++ new/usr/src/man/man3socket/socket.3socket
↓ open down ↓ 92 lines elided ↑ open up ↑
  93   93  .na
  94   94  \fB\fBSOCK_CLOEXEC\fR\fR
  95   95  .ad
  96   96  .RS 12n
  97   97  Creates the socket with the \fBFD_CLOEXEC\fR flag set, causing the underlying
  98   98  file descriptor to be closed prior to any future calls to \fBexec\fR(2). This
  99   99  is similar in purpose to the \fBO_CLOEXEC\fR flag to \fBopen\fR(2).
 100  100  .RE
 101  101  
 102  102  .sp
      103 +.ne 2
      104 +.na
      105 +\fB\fBSOCK_NDELAY\fR\fR
      106 +.ad
      107 +.RS 12n
      108 +Creates the socket with the \fBO_NDELAY\fR flag set, causing the socket to
      109 +provide nonblocking semantics as described for \fBO_NDELAY\fR in \fBopen\fR(2).
      110 +\fBSOCK_NONBLOCK\fR should normally be used in preference to \fBSOCK_NDELAY\fR,
      111 +and takes precedence if both are set.  See \fBopen\fR(2) for further details.
      112 +.RE
      113 +
      114 +.sp
      115 +.ne 2
      116 +.na
      117 +\fB\fBSOCK_NONBLOCK\fR\fR
      118 +.ad
      119 +.RS 12n
      120 +Creates the socket with the \fBO_NONBLOCK\fR flag set, causing the socket to
      121 +provide nonblocking semantics as described for \fBO_NONBLOCK\fR in \fBopen\fR(2).
      122 +.RE
      123 +
      124 +.sp
 103  125  .LP
 104  126  There must be an entry in the \fBnetconfig\fR(4) file for at least each
 105  127  protocol family and type required. If  a non-zero protocol has been specified
 106  128  but no exact match for the protocol family, type, and protocol is found, then
 107  129  the first entry containing the specified family and type with a \fIprotocol\fR
 108  130  value of zero will be used.
 109  131  .sp
 110  132  .LP
 111  133  A \fBSOCK_STREAM\fR type provides sequenced, reliable, two-way connection-based
 112  134  byte streams. An out-of-band data transmission mechanism may be supported. A
↓ open down ↓ 144 lines elided ↑ open up ↑
 257  279  
 258  280  .sp
 259  281  .ne 2
 260  282  .na
 261  283  \fB\fBEPROTOTYPE\fR\fR
 262  284  .ad
 263  285  .RS 19n
 264  286  The socket type is not supported by the protocol.
 265  287  .RE
 266  288  
      289 +.sp
      290 +.ne 2
      291 +.na
      292 +\fB\fBEINVAL\fR\fR
      293 +.ad
      294 +.RS 19n
      295 +One or more of the specified flags is not supported.
      296 +.RE
      297 +
 267  298  .SH ATTRIBUTES
 268  299  .sp
 269  300  .LP
 270  301  See \fBattributes\fR(5) for descriptions of the following attributes:
 271  302  .sp
 272  303  
 273  304  .sp
 274  305  .TS
 275  306  box;
 276  307  c | c
↓ open down ↓ 20 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX