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>
@@ -34,10 +34,12 @@
* University Acknowledgment- Portions of this document are derived from
* software developed by the University of California, Berkeley, and its
* contributors.
*/
+/* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
+
#ifndef _SYS_FCNTL_H
#define _SYS_FCNTL_H
#include <sys/feature_tests.h>
@@ -80,10 +82,11 @@
#define O_EXCL 0x400 /* exclusive open */
#define O_NOCTTY 0x800 /* don't allocate controlling tty (POSIX) */
#define O_XATTR 0x4000 /* extended attribute */
#define O_NOFOLLOW 0x20000 /* don't follow symlinks */
#define O_NOLINKS 0x40000 /* don't allow multiple hard links */
+#define O_CLOEXEC 0x800000 /* set the close-on-exec flag */
/*
* fcntl(2) requests
*
* N.B.: values are not necessarily assigned sequentially below.