diff options
author | Keith M Wesolowski <wesolows@foobazco.org> | 2013-04-03 22:06:11 +0000 |
---|---|---|
committer | Keith M Wesolowski <wesolows@foobazco.org> | 2013-04-03 22:11:48 +0000 |
commit | 47644c2a782d42cef6171070446352a68326cba5 (patch) | |
tree | 7f62d58c6876f471fecbe6c01c5b3b3704fabf7a /usr/src/uts/common/syscall | |
parent | 600f674f095b115b06a857c84f6ac041040b0269 (diff) | |
parent | b075ad5b007248d50e4c2e838b460c9c7cfd9fad (diff) | |
download | illumos-joyent-release-20130404.tar.gz |
[illumos-gate merge]20130404release-20130404
commit b075ad5b007248d50e4c2e838b460c9c7cfd9fad
3665 Implement O_CLOEXEC as an open() flag
commit 3cc3202e63472d673bcac160bfb86d1865dd9fe7
918 Need better IP fanout (esp. with VLANs present)
commit a8c23f9d905fadb090654516236f546ef3f0a1b2
3638 ld confuses files with group sections and files that should lazy load
Conflicts:
usr/src/uts/common/io/mac/mac_sched.c
Diffstat (limited to 'usr/src/uts/common/syscall')
-rw-r--r-- | usr/src/uts/common/syscall/open.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/usr/src/uts/common/syscall/open.c b/usr/src/uts/common/syscall/open.c index 6559900158..edb04c824b 100644 --- a/usr/src/uts/common/syscall/open.c +++ b/usr/src/uts/common/syscall/open.c @@ -27,6 +27,9 @@ /* All Rights Reserved */ /* + * Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. + */ +/* * Portions of this source code were derived from Berkeley 4.3 BSD * under license from the Regents of the University of California. */ @@ -226,6 +229,9 @@ noxattr: * falloc reserved. */ setf(fd, fp); + if ((filemode & FCLOEXEC) != 0) { + f_setfd(fd, FD_CLOEXEC); + } return (fd); } else { /* @@ -252,6 +258,9 @@ noxattr: fp->f_count++; mutex_exit(&fp->f_tlock); setf(fd, fp); + if ((filemode & FCLOEXEC) != 0) { + f_setfd(fd, FD_CLOEXEC); + } releasef(dupfd); } return (fd); |