]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man3/getservent.3
err.3: EXAMPLES: use EXIT_FAILURE rather than 1 as exit status
[thirdparty/man-pages.git] / man3 / getservent.3
index a475b2eba7675a53c5555aa70039492aefb991c6..c09c6eecfef864992afafabb2ce7d121eba5b6a1 100644 (file)
 .\" Modified Mon Apr 22 01:50:54 1996 by Martin Schulze <joey@infodrom.north.de>
 .\" 2001-07-25 added a clause about NULL proto (Martin Michlmayr or David N. Welton)
 .\"
-.TH GETSERVENT 3  2008-08-19 "GNU" "Linux Programmer's Manual"
+.TH GETSERVENT 3  2017-09-15 "GNU" "Linux Programmer's Manual"
 .SH NAME
 getservent, getservbyname, getservbyport, setservent, endservent \-
 get service entry
 .SH SYNOPSIS
 .nf
 .B #include <netdb.h>
-.sp
+.PP
 .B struct servent *getservent(void);
-.sp
+.PP
 .BI "struct servent *getservbyname(const char *" name ", const char *" proto );
-.sp
+.PP
 .BI "struct servent *getservbyport(int " port ", const char *" proto );
-.sp
+.PP
 .BI "void setservent(int " stayopen );
-.sp
+.PP
 .B void endservent(void);
 .fi
 .SH DESCRIPTION
@@ -112,16 +112,16 @@ The
 structure is defined in
 .I <netdb.h>
 as follows:
-.sp
+.PP
 .in +4n
-.nf
+.EX
 struct servent {
     char  *s_name;       /* official service name */
     char **s_aliases;    /* alias list */
     int    s_port;       /* port number */
     char  *s_proto;      /* protocol to use */
 }
-.fi
+.EE
 .in
 .PP
 The members of the
@@ -193,20 +193,20 @@ MT-Unsafe race:servent
 locale
 T}
 .TE
-
+.sp 1
 In the above table,
 .I servent
 in
 .I race:servent
 signifies that if any of the functions
-.BR setservent (3),
-.BR getservent (3),
+.BR setservent (),
+.BR getservent (),
 or
-.BR endservent (3)
+.BR endservent ()
 are used in parallel in different threads of a program,
 then data races could occur.
 .SH CONFORMING TO
-4.3BSD, POSIX.1-2001.
+POSIX.1-2001, POSIX.1-2008, 4.3BSD.
 .SH SEE ALSO
 .BR getnetent (3),
 .BR getprotoent (3),