Module Name: src Committed By: jruoho Date: Sat Jul 16 14:33:33 UTC 2011
Modified Files: src/lib/libc/sys: dup.2 Log Message: Note that dup2(2) and dup3(2) may not fail with EMFILE; from PR lib/45148. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/lib/libc/sys/dup.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/sys/dup.2 diff -u src/lib/libc/sys/dup.2:1.25 src/lib/libc/sys/dup.2:1.26 --- src/lib/libc/sys/dup.2:1.25 Fri Jul 15 14:59:33 2011 +++ src/lib/libc/sys/dup.2 Sat Jul 16 14:33:33 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: dup.2,v 1.25 2011/07/15 14:59:33 christos Exp $ +.\" $NetBSD: dup.2,v 1.26 2011/07/16 14:33:33 jruoho Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)dup.2 8.1 (Berkeley) 6/4/93 .\" -.Dd July 15, 2011 +.Dd July 16, 2011 .Dt DUP 2 .Os .Sh NAME @@ -125,11 +125,7 @@ .Va errno indicates the cause of the error. .Sh ERRORS -.Fn dup , -.Fn dup2 , -and -.Fn dup3 -fail if: +All three functions may fail if: .Bl -tag -width Er .It Bq Er EBADF .Fa oldd @@ -137,12 +133,19 @@ or .Fa newd is not in the range of valid file descriptors. +.El +.Pp +The +.Fn dup +function may also fail if: +.Bl -tag -width Er .It Bq Er EMFILE Too many descriptors are active. .El .Pp +The .Fn dup3 -will also fail if: +function will also fail if: .Bl -tag -width Er .It Bq Er EINVAL .Fa flags