Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 May 2013 16:22:11 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r250572 - stable/9/lib/libc/sys
Message-ID:  <201305121622.r4CGMBkK077141@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Sun May 12 16:22:10 2013
New Revision: 250572
URL: http://svnweb.freebsd.org/changeset/base/250572

Log:
  MFC r249859: getdtablesize(2): Describe what this function actually does.
  
  getdtablesize() returns the limit on new file descriptors; this says nothing
  about existing descriptors.

Modified:
  stable/9/lib/libc/sys/getdtablesize.2
Directory Properties:
  stable/9/lib/libc/   (props changed)
  stable/9/lib/libc/sys/   (props changed)

Modified: stable/9/lib/libc/sys/getdtablesize.2
==============================================================================
--- stable/9/lib/libc/sys/getdtablesize.2	Sun May 12 16:20:27 2013	(r250571)
+++ stable/9/lib/libc/sys/getdtablesize.2	Sun May 12 16:22:10 2013	(r250572)
@@ -28,12 +28,12 @@
 .\"     @(#)getdtablesize.2	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd June 4, 1993
+.Dd April 24, 2013
 .Dt GETDTABLESIZE 2
 .Os
 .Sh NAME
 .Nm getdtablesize
-.Nd get descriptor table size
+.Nd get file descriptor limit
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
@@ -41,18 +41,20 @@
 .Ft int
 .Fn getdtablesize void
 .Sh DESCRIPTION
-Each process has a fixed size descriptor table,
-which is guaranteed to have at least 20 slots.
-The entries in
-the descriptor table are numbered with small integers starting at 0.
 The
 .Fn getdtablesize
-system call returns the size of this table.
+system call returns the maximum number of file descriptors
+that the current process may open.
+The maximum file descriptor number that the system may assign
+is the return value minus one.
+Existing file descriptor numbers may be higher
+if the limit was lowered after they were opened.
 .Sh SEE ALSO
 .Xr close 2 ,
+.Xr closefrom 2 ,
 .Xr dup 2 ,
-.Xr open 2 ,
-.Xr select 2
+.Xr getrlimit 2 ,
+.Xr sysconf 2
 .Sh HISTORY
 The
 .Fn getdtablesize
_______________________________________________
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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305121622.r4CGMBkK077141>