OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man3 / getgrnam.3
index 1ff3802..9b38c44 100644 (file)
@@ -30,7 +30,7 @@
 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
 .\" Modified 2003-11-15 by aeb
 .\"
-.TH GETGRNAM 3 2012-04-23 "" "Linux Programmer's Manual"
+.TH GETGRNAM 3 2014-08-19 "" "Linux Programmer's Manual"
 .SH NAME
 getgrnam, getgrnam_r, getgrgid, getgrgid_r \- get group file entry
 .SH SYNOPSIS
@@ -87,10 +87,11 @@ The \fIgroup\fP structure is defined in \fI<grp.h>\fP as follows:
 .in +4n
 .nf
 struct group {
-    char   *gr_name;       /* group name */
-    char   *gr_passwd;     /* group password */
-    gid_t   gr_gid;        /* group ID */
-    char  **gr_mem;        /* group members */
+    char   *gr_name;        /* group name */
+    char   *gr_passwd;      /* group password */
+    gid_t   gr_gid;         /* group ID */
+    char  **gr_mem;         /* NULL-terminated array of pointers
+                               to names of group members */
 };
 .fi
 .in
@@ -207,6 +208,19 @@ Insufficient buffer space supplied.
 .TP
 .I /etc/group
 local group database file
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The
+.BR getgrnam ()
+and
+.BR getgrgid ()
+functions are not thread-safe.
+.LP
+The
+.BR getgrnam_r ()
+and
+.BR getgrgid_r ()
+functions are thread-safe.
 .SH CONFORMING TO
 SVr4, 4.3BSD, POSIX.1-2001.
 .SH NOTES
@@ -221,7 +235,7 @@ One might argue that according to POSIX
 should be left unchanged if an entry is not found.
 Experiments on various
 UNIX-like systems shows that lots of different values occur in this
-situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM and probably others.
+situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM, and probably others.
 .\" more precisely:
 .\" AIX 5.1 - gives ESRCH
 .\" OSF1 4.0g - gives EWOULDBLOCK
@@ -237,3 +251,12 @@ situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM and probably others.
 .BR getpwnam (3),
 .BR setgrent (3),
 .BR group (5)
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.