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/uts/common/sys/fcntl.h
          +++ new/usr/src/uts/common/sys/fcntl.h
↓ open down ↓ 28 lines elided ↑ open up ↑
  29   29  /*
  30   30   * University Copyright- Copyright (c) 1982, 1986, 1988
  31   31   * The Regents of the University of California
  32   32   * All Rights Reserved
  33   33   *
  34   34   * University Acknowledgment- Portions of this document are derived from
  35   35   * software developed by the University of California, Berkeley, and its
  36   36   * contributors.
  37   37   */
  38   38  
       39 +/* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
       40 +
  39   41  #ifndef _SYS_FCNTL_H
  40   42  #define _SYS_FCNTL_H
  41   43  
  42   44  #include <sys/feature_tests.h>
  43   45  
  44   46  #include <sys/types.h>
  45   47  
  46   48  #ifdef  __cplusplus
  47   49  extern "C" {
  48   50  #endif
↓ open down ↓ 26 lines elided ↑ open up ↑
  75   77  /*
  76   78   * Flag values accessible only to open(2).
  77   79   */
  78   80  #define O_CREAT         0x100   /* open with file create (uses third arg) */
  79   81  #define O_TRUNC         0x200   /* open with truncation */
  80   82  #define O_EXCL          0x400   /* exclusive open */
  81   83  #define O_NOCTTY        0x800   /* don't allocate controlling tty (POSIX) */
  82   84  #define O_XATTR         0x4000  /* extended attribute */
  83   85  #define O_NOFOLLOW      0x20000 /* don't follow symlinks */
  84   86  #define O_NOLINKS       0x40000 /* don't allow multiple hard links */
       87 +#define O_CLOEXEC       0x800000        /* set the close-on-exec flag */
  85   88  
  86   89  /*
  87   90   * fcntl(2) requests
  88   91   *
  89   92   * N.B.: values are not necessarily assigned sequentially below.
  90   93   */
  91   94  #define F_DUPFD         0       /* Duplicate fildes */
  92   95  #define F_GETFD         1       /* Get fildes flags */
  93   96  #define F_SETFD         2       /* Set fildes flags */
  94   97  #define F_GETFL         3       /* Get file flags */
↓ open down ↓ 276 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX