From jraynard@dial.pipex.com  Wed May  1 14:57:45 1996
Received: from vent.pipex.net (root@vent.pipex.net [158.43.128.5])
          by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id OAA22192
          for <freebsd-gnats-submit@freebsd.org>; Wed, 1 May 1996 14:57:41 -0700 (PDT)
Received: from dial.pipex.com by vent.pipex.net (8.6.12/PIPEX simple 1.20)
	id WAA08704; Wed, 1 May 1996 22:57:34 +0100
Received: (from jraynard@localhost) by dial.pipex.com (8.6.12/8.6.12) id QAA00657; Wed, 1 May 1996 16:25:46 GMT
Message-Id: <199605011625.QAA00657@dial.pipex.com>
Date: Wed, 1 May 1996 16:25:46 GMT
From: James Raynard <jraynard@dial.pipex.com>
Reply-To: jraynard@dial.pipex.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: fcntl(2) refers to non-existent F_DUPED cmd.
X-Send-Pr-Version: 3.2

>Number:         1167
>Category:       docs
>Synopsis:       fcntl(2) refers to non-existent F_DUPED cmd.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May  1 15:00:01 PDT 1996
>Closed-Date:    Wed May 1 15:20:47 PDT 1996
>Last-Modified:  Wed May  1 15:21:07 PDT 1996
>Originator:     James Raynard
>Release:        FreeBSD 2.1-STABLE i386
>Organization:
A FreeBSD box
>Environment:

FreeBSD 2.1.0-RELEASE

>Description:

The "Errors" section of the fcntl(2) man page contains the following:-

[EMFILE]      Cmd is F_DUPFD and the maximum allowed number of file de-
                   scriptors are currently open.

...

[EMFILE]      The argument cmd is F_DUPED and the maximum number of file
                   descriptors permitted for the process are already in use,
                   or no file descriptors greater than or equal to arg are
                   available.

However, there is no such cmd as FD_DUPED.

>How-To-Repeat:

man fcntl

>Fix:

Assuming F_DUPED is a typo and the second entry was meant to replace
the first, apply this diff in /usr/src/lib/libc/sys:-

--- fcntl.2~	Wed May  1 16:06:20 1996
--- fcntl.2	Wed May  1 16:20:11 1996
***************
*** 401,412 ****
  and
  .Fa fildes
  is not a valid file descriptor open for writing.
- .It Bq Er EMFILE
- .Fa Cmd
- is
- .Dv F_DUPFD
- and the maximum allowed number of file descriptors are currently
- open.
  .It Bq Er EDEADLK
  The argument
  .Fa cmd
--- 401,406 ----
***************
*** 445,451 ****
  The argument
  .Fa cmd
  is
! .Dv F_DUPED
  and the maximum number of file descriptors permitted for the
  process are already in use,
  or no file descriptors greater than or equal to
--- 439,445 ----
  The argument
  .Fa cmd
  is
! .Dv F_DUPFD
  and the maximum number of file descriptors permitted for the
  process are already in use,
  or no file descriptors greater than or equal to

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mpp 
State-Changed-When: Wed May 1 15:20:47 PDT 1996 
State-Changed-Why:  
Suggested fix applied. 
>Unformatted:
