OSDN Git Service

(split) LDP: Update original to LDP v3.40.
[linuxjm/LDP_man-pages.git] / original / man3 / getgrnam.3
index e4afa3e..62ca333 100644 (file)
@@ -28,7 +28,7 @@
 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
 .\" Modified 2003-11-15 by aeb
 .\"
-.TH GETGRNAM 3 2010-10-21 "" "Linux Programmer's Manual"
+.TH GETGRNAM 3 2012-04-23 "" "Linux Programmer's Manual"
 .SH NAME
 getgrnam, getgrnam_r, getgrgid, getgrgid_r \- get group file entry
 .SH SYNOPSIS
@@ -119,12 +119,18 @@ A pointer to the result (in case of success) or NULL (in case no entry
 was found or an error occurred) is stored in
 .IR *result .
 .PP
-The maximum needed size for
-.I buf
-can be found using
-.BR sysconf (3)
-with the argument
-.BR _SC_GETGR_R_SIZE_MAX .
+The call
+
+    sysconf(_SC_GETGR_R_SIZE_MAX)
+
+returns either \-1, without changing
+.IR errno ,
+or an initial suggested size for
+.IR buf .
+(If this size is too small,
+the call fails with
+.BR ERANGE ,
+in which case the caller can retry with a larger buffer.)
 .SH "RETURN VALUE"
 The
 .BR getgrnam ()