diff options
author | 2002-02-08 18:46:12 +0000 | |
---|---|---|
committer | 2002-02-08 18:46:12 +0000 | |
commit | 61f77eeb7121d0a1dccbfb885a02fd08debcb29b (patch) | |
tree | 86e85b3f2b7f4874c56baa769813ef80294d2785 /lib | |
parent | Add a comment about an obscure behavior in dup2(2). (diff) | |
download | wireguard-openbsd-61f77eeb7121d0a1dccbfb885a02fd08debcb29b.tar.xz wireguard-openbsd-61f77eeb7121d0a1dccbfb885a02fd08debcb29b.zip |
Document that close-on-exec is not touched in dup2 when oldd == newd.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/sys/dup.2 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc/sys/dup.2 b/lib/libc/sys/dup.2 index 09ebf6cd98f..63b3f3bfb55 100644 --- a/lib/libc/sys/dup.2 +++ b/lib/libc/sys/dup.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: dup.2,v 1.8 2000/10/18 05:12:08 aaron Exp $ +.\" $OpenBSD: dup.2,v 1.9 2002/02/08 18:46:12 art Exp $ .\" $NetBSD: dup.2,v 1.4 1995/02/27 12:32:21 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -95,6 +95,9 @@ is specified. If this descriptor is already in use, it is first deallocated as if a .Xr close 2 call had been done first. +When newd equals oldd +.Fn dup2 +just returns without affecting the close-on-exec flag. .Sh RETURN VALUES The value \-1 is returned if an error occurs in either call. The external variable |