Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/sys Note that dup2(2) and dup3(2) may not fail with...



details:   https://anonhg.NetBSD.org/src/rev/32efc98223dc
branches:  trunk
changeset: 767344:32efc98223dc
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Sat Jul 16 14:33:33 2011 +0000

description:
Note that dup2(2) and dup3(2) may not fail with EMFILE; from PR lib/45148.

diffstat:

 lib/libc/sys/dup.2 |  19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diffs (52 lines):

diff -r 130476a46a16 -r 32efc98223dc lib/libc/sys/dup.2
--- a/lib/libc/sys/dup.2        Sat Jul 16 14:29:15 2011 +0000
+++ b/lib/libc/sys/dup.2        Sat Jul 16 14:33:33 2011 +0000
@@ -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



Home | Main Index | Thread Index | Old Index