From peterjeremy@acm.org  Fri Feb 10 22:46:14 2012
Return-Path: <peterjeremy@acm.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AD159106566B
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 10 Feb 2012 22:46:14 +0000 (UTC)
	(envelope-from peterjeremy@acm.org)
Received: from mail35.syd.optusnet.com.au (mail35.syd.optusnet.com.au [211.29.133.51])
	by mx1.freebsd.org (Postfix) with ESMTP id 47FED8FC12
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 10 Feb 2012 22:46:13 +0000 (UTC)
Received: from server.vk2pj.dyndns.org (c220-239-116-103.belrs4.nsw.optusnet.com.au [220.239.116.103])
	by mail35.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q1AMkB85032415
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 11 Feb 2012 09:46:12 +1100
Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1])
	by server.vk2pj.dyndns.org (8.14.5/8.14.4) with ESMTP id q1AMkB6X019308;
	Sat, 11 Feb 2012 09:46:11 +1100 (EST)
	(envelope-from peter@server.vk2pj.dyndns.org)
Received: (from peter@localhost)
	by server.vk2pj.dyndns.org (8.14.5/8.14.4/Submit) id q1AMkAhN019307;
	Sat, 11 Feb 2012 09:46:10 +1100 (EST)
	(envelope-from peter)
Message-Id: <201202102246.q1AMkAhN019307@server.vk2pj.dyndns.org>
Date: Sat, 11 Feb 2012 09:46:10 +1100 (EST)
From: Peter Jeremy <peterjeremy@acm.org>
Reply-To: Peter Jeremy <peterjeremy@acm.org>
To: FreeBSD-gnats-submit@freebsd.org
Subject: dup2(2) incorrectly returns EMFILE instead of EBADF
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         164970
>Category:       kern
>Synopsis:       dup2(2) incorrectly returns EMFILE instead of EBADF
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    eadler
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 10 22:50:11 UTC 2012
>Closed-Date:    Thu May 03 16:52:07 UTC 2012
>Last-Modified:  Mon May  7 12:40:07 UTC 2012
>Originator:     Peter Jeremy
>Release:        FreeBSD 8.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD server.vk2pj.dyndns.org 8.2-STABLE FreeBSD 8.2-STABLE #15: Thu Feb 2 11:02:29 EST 2012 root@server.vk2pj.dyndns.org:/var/obj/usr/src/sys/server amd64

>Description:
	http://pubs.opengroup.org/onlinepubs/9699919799/functions/dup.html
	states that dup2() should return EBADF if the second argumunt is
	"greater than or equal to {OPEN_MAX}."  FreeBSD returns EMFILE in
	this case (this was broken in r124548).  FreeBSD also returns
	EMFILE for fcntl(F_DUP2FD) but this operation is not defined by
	The Open Group.

	Note that GNU autotools disables the use of dup2() on FreeBSD due
	to this error.

>How-To-Repeat:
	ktrace the execution of:
#include <unistd.h>
int main(int argc, char **argv) { return dup2(1,1000000); }

>Fix:
Index: sys/kern/kern_descrip.c
===================================================================
--- sys/kern/kern_descrip.c	(revision 231385)
+++ sys/kern/kern_descrip.c	(working copy)
@@ -813,7 +813,7 @@
 	maxfd = min((int)lim_cur(p, RLIMIT_NOFILE), maxfilesperproc);
 	PROC_UNLOCK(p);
 	if (new >= maxfd)
-		return (flags & DUP_FCNTL ? EINVAL : EMFILE);
+		return (flags & DUP_FCNTL ? EINVAL : EBADF);
 
 	FILEDESC_XLOCK(fdp);
 	if (old >= fdp->fd_nfiles || fdp->fd_ofiles[old] == NULL) {
Index: lib/libc/sys/fcntl.2
===================================================================
--- lib/libc/sys/fcntl.2	(revision 231385)
+++ lib/libc/sys/fcntl.2	(working copy)
@@ -539,8 +539,6 @@
 .Fa cmd
 is
 .Dv F_DUPFD
-or
-.Dv F_DUP2FD
 and the maximum number of file descriptors permitted for the
 process are already in use,
 or no file descriptors greater than or equal to
Index: lib/libc/sys/dup.2
===================================================================
--- lib/libc/sys/dup.2	(revision 231385)
+++ lib/libc/sys/dup.2	(working copy)
@@ -128,20 +128,27 @@
 .Sh ERRORS
 The
 .Fn dup
-and
-.Fn dup2
-system calls fail if:
+system call fails if:
 .Bl -tag -width Er
 .It Bq Er EBADF
 The
 .Fa oldd
-or
-.Fa newd
 argument
 is not a valid active descriptor
 .It Bq Er EMFILE
 Too many descriptors are active.
 .El
+The
+.Fn dup2
+system call fails if:
+.Bl -tag -width Er
+.It Bq Er EBADF
+The
+.Fa oldd
+argument is not a valid active descriptor or the
+.Fa newd
+argument is negative or exceeds the maximum allowable descriptor number
+.El
 .Sh SEE ALSO
 .Xr accept 2 ,
 .Xr cap_new 2 ,
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->eadler 
Responsible-Changed-By: eadler 
Responsible-Changed-When: Fri Feb 10 23:07:42 UTC 2012 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164970 
State-Changed-From-To: open->analyzed 
State-Changed-By: eadler 
State-Changed-When: Tue Mar 27 01:31:24 UTC 2012 
State-Changed-Why:  
awaiting approval 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164970 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/164970: commit references a PR
Date: Wed, 11 Apr 2012 14:08:25 +0000 (UTC)

 Author: eadler
 Date: Wed Apr 11 14:08:09 2012
 New Revision: 234131
 URL: http://svn.freebsd.org/changeset/base/234131
 
 Log:
   Return EBADF instead of EMFILE from dup2 when the second argument is
   outside the range of valid file descriptors
   
   PR:		kern/164970
   Submitted by:	Peter Jeremy <peterjeremy@acm.org>
   Reviewed by:	jilles
   Approved by:	cperciva
   MFC after:	1 week
 
 Modified:
   head/lib/libc/sys/dup.2
   head/lib/libc/sys/fcntl.2
   head/sys/kern/kern_descrip.c
 
 Modified: head/lib/libc/sys/dup.2
 ==============================================================================
 --- head/lib/libc/sys/dup.2	Wed Apr 11 12:26:30 2012	(r234130)
 +++ head/lib/libc/sys/dup.2	Wed Apr 11 14:08:09 2012	(r234131)
 @@ -128,20 +128,27 @@ indicates the cause of the error.
  .Sh ERRORS
  The
  .Fn dup
 -and
 -.Fn dup2
 -system calls fail if:
 +system call fails if:
  .Bl -tag -width Er
  .It Bq Er EBADF
  The
  .Fa oldd
 -or
 -.Fa newd
  argument
  is not a valid active descriptor
  .It Bq Er EMFILE
  Too many descriptors are active.
  .El
 +The
 +.Fn dup2
 +system call fails if:
 +.Bl -tag -width Er
 +.It Bq Er EBADF
 +The
 +.Fa oldd
 +argument is not a valid active descriptor or the
 +.Fa newd
 +argument is negative or exceeds the maximum allowable descriptor number
 +.El
  .Sh SEE ALSO
  .Xr accept 2 ,
  .Xr cap_new 2 ,
 
 Modified: head/lib/libc/sys/fcntl.2
 ==============================================================================
 --- head/lib/libc/sys/fcntl.2	Wed Apr 11 12:26:30 2012	(r234130)
 +++ head/lib/libc/sys/fcntl.2	Wed Apr 11 14:08:09 2012	(r234131)
 @@ -539,8 +539,6 @@ The argument
  .Fa cmd
  is
  .Dv F_DUPFD
 -or
 -.Dv F_DUP2FD
  and the maximum number of file descriptors permitted for the
  process are already in use,
  or no file descriptors greater than or equal to
 
 Modified: head/sys/kern/kern_descrip.c
 ==============================================================================
 --- head/sys/kern/kern_descrip.c	Wed Apr 11 12:26:30 2012	(r234130)
 +++ head/sys/kern/kern_descrip.c	Wed Apr 11 14:08:09 2012	(r234131)
 @@ -817,7 +817,7 @@ do_dup(struct thread *td, int flags, int
  	maxfd = min((int)lim_cur(p, RLIMIT_NOFILE), maxfilesperproc);
  	PROC_UNLOCK(p);
  	if (new >= maxfd)
 -		return (flags & DUP_FCNTL ? EINVAL : EMFILE);
 +		return (flags & DUP_FCNTL ? EINVAL : EBADF);
  
  	FILEDESC_XLOCK(fdp);
  	if (old >= fdp->fd_nfiles || fdp->fd_ofiles[old] == NULL) {
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: analyzed->patched 
State-Changed-By: eadler 
State-Changed-When: Wed Apr 11 14:14:11 UTC 2012 
State-Changed-Why:  
committed in r234131 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164970 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/164970: commit references a PR
Date: Thu,  3 May 2012 16:31:31 +0000 (UTC)

 Author: eadler
 Date: Thu May  3 16:31:21 2012
 New Revision: 234966
 URL: http://svn.freebsd.org/changeset/base/234966
 
 Log:
   MFC r234131:
   	Return EBADF instead of EMFILE from dup2 when the second argument is
   	outside the range of valid file descriptors
   
   PR:		kern/164970
   Approved by:	cperciva (implicit)
 
 Modified:
   stable/9/lib/libc/sys/dup.2
   stable/9/lib/libc/sys/fcntl.2
 Directory Properties:
   stable/9/lib/libc/   (props changed)
   stable/9/lib/libc/sys/   (props changed)
 
 Modified: stable/9/lib/libc/sys/dup.2
 ==============================================================================
 --- stable/9/lib/libc/sys/dup.2	Thu May  3 16:21:26 2012	(r234965)
 +++ stable/9/lib/libc/sys/dup.2	Thu May  3 16:31:21 2012	(r234966)
 @@ -128,20 +128,27 @@ indicates the cause of the error.
  .Sh ERRORS
  The
  .Fn dup
 -and
 -.Fn dup2
 -system calls fail if:
 +system call fails if:
  .Bl -tag -width Er
  .It Bq Er EBADF
  The
  .Fa oldd
 -or
 -.Fa newd
  argument
  is not a valid active descriptor
  .It Bq Er EMFILE
  Too many descriptors are active.
  .El
 +The
 +.Fn dup2
 +system call fails if:
 +.Bl -tag -width Er
 +.It Bq Er EBADF
 +The
 +.Fa oldd
 +argument is not a valid active descriptor or the
 +.Fa newd
 +argument is negative or exceeds the maximum allowable descriptor number
 +.El
  .Sh SEE ALSO
  .Xr accept 2 ,
  .Xr cap_new 2 ,
 
 Modified: stable/9/lib/libc/sys/fcntl.2
 ==============================================================================
 --- stable/9/lib/libc/sys/fcntl.2	Thu May  3 16:21:26 2012	(r234965)
 +++ stable/9/lib/libc/sys/fcntl.2	Thu May  3 16:31:21 2012	(r234966)
 @@ -539,8 +539,6 @@ The argument
  .Fa cmd
  is
  .Dv F_DUPFD
 -or
 -.Dv F_DUP2FD
  and the maximum number of file descriptors permitted for the
  process are already in use,
  or no file descriptors greater than or equal to
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/164970: commit references a PR
Date: Thu,  3 May 2012 16:32:00 +0000 (UTC)

 Author: eadler
 Date: Thu May  3 16:31:44 2012
 New Revision: 234967
 URL: http://svn.freebsd.org/changeset/base/234967
 
 Log:
   MFC r234131:
   	Return EBADF instead of EMFILE from dup2 when the second argument is
   	outside the range of valid file descriptors
   
   PR:		kern/164970
   Approved by:	cperciva (implicit)
 
 Modified:
   stable/8/lib/libc/sys/dup.2
   stable/8/lib/libc/sys/fcntl.2
 Directory Properties:
   stable/8/lib/libc/   (props changed)
   stable/8/lib/libc/sys/   (props changed)
 
 Modified: stable/8/lib/libc/sys/dup.2
 ==============================================================================
 --- stable/8/lib/libc/sys/dup.2	Thu May  3 16:31:21 2012	(r234966)
 +++ stable/8/lib/libc/sys/dup.2	Thu May  3 16:31:44 2012	(r234967)
 @@ -123,20 +123,27 @@ indicates the cause of the error.
  .Sh ERRORS
  The
  .Fn dup
 -and
 -.Fn dup2
 -system calls fail if:
 +system call fails if:
  .Bl -tag -width Er
  .It Bq Er EBADF
  The
  .Fa oldd
 -or
 -.Fa newd
  argument
  is not a valid active descriptor
  .It Bq Er EMFILE
  Too many descriptors are active.
  .El
 +The
 +.Fn dup2
 +system call fails if:
 +.Bl -tag -width Er
 +.It Bq Er EBADF
 +The
 +.Fa oldd
 +argument is not a valid active descriptor or the
 +.Fa newd
 +argument is negative or exceeds the maximum allowable descriptor number
 +.El
  .Sh SEE ALSO
  .Xr accept 2 ,
  .Xr close 2 ,
 
 Modified: stable/8/lib/libc/sys/fcntl.2
 ==============================================================================
 --- stable/8/lib/libc/sys/fcntl.2	Thu May  3 16:31:21 2012	(r234966)
 +++ stable/8/lib/libc/sys/fcntl.2	Thu May  3 16:31:44 2012	(r234967)
 @@ -539,8 +539,6 @@ The argument
  .Fa cmd
  is
  .Dv F_DUPFD
 -or
 -.Dv F_DUP2FD
  and the maximum number of file descriptors permitted for the
  process are already in use,
  or no file descriptors greater than or equal to
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/164970: commit references a PR
Date: Thu,  3 May 2012 16:32:24 +0000 (UTC)

 Author: eadler
 Date: Thu May  3 16:32:09 2012
 New Revision: 234968
 URL: http://svn.freebsd.org/changeset/base/234968
 
 Log:
   MFC r234131:
   	Return EBADF instead of EMFILE from dup2 when the second argument is
   	outside the range of valid file descriptors
   
   PR:		kern/164970
   Approved by:	cperciva (implicit)
 
 Modified:
   stable/7/lib/libc/sys/dup.2
   stable/7/lib/libc/sys/fcntl.2
 Directory Properties:
   stable/7/lib/libc/   (props changed)
 
 Modified: stable/7/lib/libc/sys/dup.2
 ==============================================================================
 --- stable/7/lib/libc/sys/dup.2	Thu May  3 16:31:44 2012	(r234967)
 +++ stable/7/lib/libc/sys/dup.2	Thu May  3 16:32:09 2012	(r234968)
 @@ -123,20 +123,27 @@ indicates the cause of the error.
  .Sh ERRORS
  The
  .Fn dup
 -and
 -.Fn dup2
 -system calls fail if:
 +system call fails if:
  .Bl -tag -width Er
  .It Bq Er EBADF
  The
  .Fa oldd
 -or
 -.Fa newd
  argument
  is not a valid active descriptor
  .It Bq Er EMFILE
  Too many descriptors are active.
  .El
 +The
 +.Fn dup2
 +system call fails if:
 +.Bl -tag -width Er
 +.It Bq Er EBADF
 +The
 +.Fa oldd
 +argument is not a valid active descriptor or the
 +.Fa newd
 +argument is negative or exceeds the maximum allowable descriptor number
 +.El
  .Sh SEE ALSO
  .Xr accept 2 ,
  .Xr close 2 ,
 
 Modified: stable/7/lib/libc/sys/fcntl.2
 ==============================================================================
 --- stable/7/lib/libc/sys/fcntl.2	Thu May  3 16:31:44 2012	(r234967)
 +++ stable/7/lib/libc/sys/fcntl.2	Thu May  3 16:32:09 2012	(r234968)
 @@ -523,8 +523,6 @@ The argument
  .Fa cmd
  is
  .Dv F_DUPFD
 -or
 -.Dv F_DUP2FD
  and the maximum number of file descriptors permitted for the
  process are already in use,
  or no file descriptors greater than or equal to
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: eadler 
State-Changed-When: Thu May 3 16:52:06 UTC 2012 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164970 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/164970: commit references a PR
Date: Mon,  7 May 2012 12:20:15 +0000 (UTC)

 Author: eadler
 Date: Mon May  7 12:19:49 2012
 New Revision: 235125
 URL: http://svn.freebsd.org/changeset/base/235125
 
 Log:
   MFC r234131:
   	Return EBADF instead of EMFILE from dup2 when the second argument is
   	outside the range of valid file descriptors
   
   PR:		kern/164970
   Approved by:	cperciva (implicit)
 
 Modified:
   stable/9/sys/kern/kern_descrip.c
 Directory Properties:
   stable/9/sys/   (props changed)
 
 Modified: stable/9/sys/kern/kern_descrip.c
 ==============================================================================
 --- stable/9/sys/kern/kern_descrip.c	Mon May  7 10:50:26 2012	(r235124)
 +++ stable/9/sys/kern/kern_descrip.c	Mon May  7 12:19:49 2012	(r235125)
 @@ -815,7 +815,7 @@ do_dup(struct thread *td, int flags, int
  	maxfd = min((int)lim_cur(p, RLIMIT_NOFILE), maxfilesperproc);
  	PROC_UNLOCK(p);
  	if (new >= maxfd)
 -		return (flags & DUP_FCNTL ? EINVAL : EMFILE);
 +		return (flags & DUP_FCNTL ? EINVAL : EBADF);
  
  	FILEDESC_XLOCK(fdp);
  	if (old >= fdp->fd_nfiles || fdp->fd_ofiles[old] == NULL) {
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/164970: commit references a PR
Date: Mon,  7 May 2012 12:20:35 +0000 (UTC)

 Author: eadler
 Date: Mon May  7 12:20:26 2012
 New Revision: 235126
 URL: http://svn.freebsd.org/changeset/base/235126
 
 Log:
   MFC r234131:
   	Return EBADF instead of EMFILE from dup2 when the second argument is
   	outside the range of valid file descriptors
   
   PR:		kern/164970
   Approved by:	cperciva (implicit)
 
 Modified:
   stable/8/sys/kern/kern_descrip.c
 Directory Properties:
   stable/8/sys/   (props changed)
 
 Modified: stable/8/sys/kern/kern_descrip.c
 ==============================================================================
 --- stable/8/sys/kern/kern_descrip.c	Mon May  7 12:19:49 2012	(r235125)
 +++ stable/8/sys/kern/kern_descrip.c	Mon May  7 12:20:26 2012	(r235126)
 @@ -772,7 +772,7 @@ do_dup(struct thread *td, int flags, int
  	maxfd = min((int)lim_cur(p, RLIMIT_NOFILE), maxfilesperproc);
  	PROC_UNLOCK(p);
  	if (new >= maxfd)
 -		return (flags & DUP_FCNTL ? EINVAL : EMFILE);
 +		return (flags & DUP_FCNTL ? EINVAL : EBADF);
  
  	FILEDESC_XLOCK(fdp);
  	if (old >= fdp->fd_nfiles || fdp->fd_ofiles[old] == NULL) {
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/164970: commit references a PR
Date: Mon,  7 May 2012 12:33:29 +0000 (UTC)

 Author: eadler
 Date: Mon May  7 12:33:17 2012
 New Revision: 235127
 URL: http://svn.freebsd.org/changeset/base/235127
 
 Log:
   Undo MFC r234131:
   	The kernel change can't be MFCed so undo the documentation MFC.
   
   PR:		kern/164970
   Approved by:	cperciva (implicit)
 
 Modified:
   stable/7/lib/libc/sys/dup.2
   stable/7/lib/libc/sys/fcntl.2
 Directory Properties:
   stable/7/lib/libc/   (props changed)
 
 Modified: stable/7/lib/libc/sys/dup.2
 ==============================================================================
 --- stable/7/lib/libc/sys/dup.2	Mon May  7 12:20:26 2012	(r235126)
 +++ stable/7/lib/libc/sys/dup.2	Mon May  7 12:33:17 2012	(r235127)
 @@ -123,27 +123,20 @@ indicates the cause of the error.
  .Sh ERRORS
  The
  .Fn dup
 -system call fails if:
 +and
 +.Fn dup2
 +system calls fail if:
  .Bl -tag -width Er
  .It Bq Er EBADF
  The
  .Fa oldd
 +or
 +.Fa newd
  argument
  is not a valid active descriptor
  .It Bq Er EMFILE
  Too many descriptors are active.
  .El
 -The
 -.Fn dup2
 -system call fails if:
 -.Bl -tag -width Er
 -.It Bq Er EBADF
 -The
 -.Fa oldd
 -argument is not a valid active descriptor or the
 -.Fa newd
 -argument is negative or exceeds the maximum allowable descriptor number
 -.El
  .Sh SEE ALSO
  .Xr accept 2 ,
  .Xr close 2 ,
 
 Modified: stable/7/lib/libc/sys/fcntl.2
 ==============================================================================
 --- stable/7/lib/libc/sys/fcntl.2	Mon May  7 12:20:26 2012	(r235126)
 +++ stable/7/lib/libc/sys/fcntl.2	Mon May  7 12:33:17 2012	(r235127)
 @@ -523,6 +523,8 @@ The argument
  .Fa cmd
  is
  .Dv F_DUPFD
 +or
 +.Dv F_DUP2FD
  and the maximum number of file descriptors permitted for the
  process are already in use,
  or no file descriptors greater than or equal to
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
