comparison usr/src/man/man2/fcntl.2 @ 14022:19e11862653b

3713 Implement accept4() 3714 Implement pipe2() 3715 Implement dup3() 3716 Implement mkostemp() and mkostemps() 3719 so_socketpair syscall should preserve FD_CLOEXEC flag Reviewed by: Dan McDonald <danmcd@nexenta.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Garrett D'Amore <garrett@damore.org>
author Theo Schlossnagle <jesus@omniti.com>
date Thu, 11 Apr 2013 04:50:36 +0000
parents 5b2854ecc12d
children
comparison
equal deleted inserted replaced
14021:1faa5bdf272f 14022:19e11862653b
1 '\" te 1 '\" te
2 .\" Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. 3 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
3 .\" Copyright 1989 AT&T 4 .\" Copyright 1989 AT&T
4 .\" Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. 5 .\" Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved.
5 .\" 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 .\" 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 .\" http://www.opengroup.org/bookstore/. 7 .\" http://www.opengroup.org/bookstore/.
7 .\" 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 .\" 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 .\" This notice shall appear on any product containing this material. 9 .\" This notice shall appear on any product containing this material.
9 .\" 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 .\" 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 .\" 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 .\" 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 .\" 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 .\" 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 .TH FCNTL 2 "Jan 17, 2007" 13 .TH FCNTL 2 "Apr 19, 2013"
13 .SH NAME 14 .SH NAME
14 fcntl \- file control 15 fcntl \- file control
15 .SH SYNOPSIS 16 .SH SYNOPSIS
16 .LP 17 .LP
17 .nf 18 .nf
57 .ad 58 .ad
58 .RS 15n 59 .RS 15n
59 Similar to \fBF_DUPFD\fR, but always returns \fIarg\fR. \fBF_DUP2FD\fR closes 60 Similar to \fBF_DUPFD\fR, but always returns \fIarg\fR. \fBF_DUP2FD\fR closes
60 \fIarg\fR if it is open and not equal to \fIfildes.\fR \fBF_DUP2FD\fR is 61 \fIarg\fR if it is open and not equal to \fIfildes.\fR \fBF_DUP2FD\fR is
61 equivalent to \fBdup2\fR(\fIfildes\fR, \fIarg\fR). 62 equivalent to \fBdup2\fR(\fIfildes\fR, \fIarg\fR).
63 .RE
64
65 .sp
66 .ne 2
67 .na
68 \fB\fBF_DUPFD_CLOEXEC\fR\fR
69 .ad
70 .RS 15n
71 Similar to \fBF_DUPFD\fR except that instead of clearing \fBFD_CLOEXEC\fR
72 it is explicitly set on the returned file descriptor.
73 .RE
74
75 .sp
76 .ne 2
77 .na
78 \fB\fBF_DUP2FD_CLOEXEC\fR\fR
79 .ad
80 .RS 15n
81 Similar to \fBF_DUP2FD\fR with two exceptions. The \fBFD_CLOEXEC\fR flag is
82 explicitly set on the returned file descriptor. If \fIfiledes\fR equals
83 \fIarg\fR, the call will fail setting \fBerrno\fR to \fBEINVAL\fR.
62 .RE 84 .RE
63 85
64 .sp 86 .sp
65 .ne 2 87 .ne 2
66 .na 88 .na
760 \fBF_SETLKW64\fR and the data pointed to by \fIarg\fR is not valid; or 782 \fBF_SETLKW64\fR and the data pointed to by \fIarg\fR is not valid; or
761 \fIfildes\fR refers to a file that does not support locking. 783 \fIfildes\fR refers to a file that does not support locking.
762 .sp 784 .sp
763 The \fIcmd\fR argument is \fBF_UNSHARE\fR and a reservation with this 785 The \fIcmd\fR argument is \fBF_UNSHARE\fR and a reservation with this
764 \fBf_id\fR for this process does not exist. 786 \fBf_id\fR for this process does not exist.
787 .sp
788 The \fIcmd\fR argument is \fBF_DUP2FD_CLOEXEC\fR and \fIfildes\fR is equal
789 to \fBarg\fR.
765 .RE 790 .RE
766 791
767 .sp 792 .sp
768 .ne 2 793 .ne 2
769 .na 794 .na