diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-02-08 18:43:55 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-02-08 18:43:55 +0000 |
commit | 994ab11b1e01c114152acdd5ea1dff90d27940ac (patch) | |
tree | eac45cbc3268807bf4819581e903420b142be813 /sys | |
parent | 9f81520a3c5cc4e47f4bb8f867707113b3bd0a9a (diff) |
Add a comment about an obscure behavior in dup2(2).
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_descrip.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 1a8508314f9..62e376ef291 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_descrip.c,v 1.50 2002/02/08 18:29:08 art Exp $ */ +/* $OpenBSD: kern_descrip.c,v 1.51 2002/02/08 18:43:54 art Exp $ */ /* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */ /* @@ -263,6 +263,11 @@ restart: (u_int)new >= maxfiles) return (EBADF); if (old == new) { + /* + * NOTE! This doesn't clear the close-on-exec flag. This might + * or might not be the intended behavior from the start, but + * this is what everyone else does. + */ *retval = new; return (0); } |