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/file.h
          +++ new/usr/src/uts/common/sys/file.h
↓ open down ↓ 18 lines elided ↑ open up ↑
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   */
  25   25  
  26   26  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  27   27  /*        All Rights Reserved   */
  28   28  
       29 +/* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
       30 +
  29   31  #ifndef _SYS_FILE_H
  30   32  #define _SYS_FILE_H
  31   33  
  32   34  #include <sys/t_lock.h>
  33   35  #ifdef _KERNEL
  34   36  #include <sys/model.h>
  35   37  #include <sys/user.h>
  36   38  #endif
  37   39  
  38   40  #ifdef  __cplusplus
↓ open down ↓ 67 lines elided ↑ open up ↑
 106  108  #define FNOFOLLOW       0x20000 /* don't follow symlinks */
 107  109  #define FNOLINKS        0x40000 /* don't allow multiple hard links */
 108  110  #define FIGNORECASE     0x80000 /* request case-insensitive lookups */
 109  111  #define FXATTRDIROPEN   0x100000  /* only opening hidden attribute directory */
 110  112  
 111  113  /* f_flag2 (open-only) */
 112  114  
 113  115  #define FSEARCH         0x200000        /* O_SEARCH = 0x200000 */
 114  116  #define FEXEC           0x400000        /* O_EXEC = 0x400000 */
 115  117  
      118 +#define FCLOEXEC        0x800000 /* O_CLOEXEC = 0x800000 */
      119 +
 116  120  #ifdef _KERNEL
 117  121  
 118  122  /*
 119  123   * Fake flags for driver ioctl calls to inform them of the originating
 120  124   * process' model.  See <sys/model.h>
 121  125   *
 122  126   * Part of the Solaris 2.6+ DDI/DKI
 123  127   */
 124  128  #define FMODELS DATAMODEL_MASK  /* Note: 0x0ff00000 */
 125  129  #define FILP32  DATAMODEL_ILP32
↓ open down ↓ 100 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX