Print this page
3665 Implement O_CLOEXEC as an open() flag
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Dan McDonald <danmcd@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man2/open.2
          +++ new/usr/src/man/man2/open.2
   1    1  '\" te
   2    2  .\" Copyright (c) 2008, Sun Microsystems, Inc.  All Rights Reserved.
   3    3  .\" Copyright 1989 AT&T
   4    4  .\" Portions Copyright (c) 1992, X/Open Company Limited.  All Rights Reserved.
        5 +.\" Portions Copyright (c) 2013, OmniTI Computer Consulting, Inc.  All Rights Reserved.
   5    6  .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
   6    7  .\" http://www.opengroup.org/bookstore/.
   7    8  .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
   8    9  .\"  This notice shall appear on any product containing this material.
   9   10  .\" 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.
  10   11  .\" 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.
  11   12  .\" 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]
  12   13  .TH OPEN 2 "Jun 16, 2008"
  13   14  .SH NAME
  14   15  open, openat \- open a file
↓ open down ↓ 189 lines elided ↑ open up ↑
 204  205  .ne 2
 205  206  .na
 206  207  \fB\fBO_NOLINKS\fR\fR
 207  208  .ad
 208  209  .sp .6
 209  210  .RS 4n
 210  211  If the link count of the named file is greater than 1, \fBopen()\fR fails and
 211  212  sets \fBerrno\fR to \fBEMLINK\fR.
 212  213  .RE
 213  214  
      215 +.sp
      216 +.ne 2
      217 +.na
      218 +\fB\fBO_CLOEXEC\fR\fR
      219 +.ad
      220 +.sp .6
      221 +.RS 4n
      222 +If set, the filedescriptor returned will be closed prior to any future
      223 +\fBexec()\fR calls.
      224 +.RE
      225 +
 214  226  .sp
 215  227  .ne 2
 216  228  .na
 217  229  \fB\fBO_NONBLOCK\fR or \fBO_NDELAY\fR\fR
 218  230  .ad
 219  231  .sp .6
 220  232  .RS 4n
 221  233  These flags can affect subsequent reads and writes (see \fBread\fR(2) and
 222  234  \fBwrite\fR(2)). If both \fBO_NDELAY\fR and \fBO_NONBLOCK\fR are set,
 223  235  \fBO_NONBLOCK\fR takes precedence.
↓ open down ↓ 686 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX