This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]man-pages-1.48 update for getutent


Andries,

Please find attached a PATCH which adds a NOTE section to the main3/getutent.3 manpage.

This bit us in the past and might be useful for others. I have a small sample code, incase someone is interested.

For the glibc hackers, this happens due to static variables in sysdeps/generic/utmp_file.c.

Thanks and Regards
Amit
diff -ur man-pages-1.48/man3/getutent.3 man-pages-1.48-getutent/man3/getutent.3
--- man-pages-1.48/man3/getutent.3	Mon Dec 17 05:33:43 2001
+++ man-pages-1.48-getutent/man3/getutent.3	Wed Aug 14 16:09:44 2002
@@ -83,6 +83,11 @@
 \fBgetutent\fP(), \fBgetutid\fP(), \fBgetutline\fP() and \fBpututline\fP()
 return a pointer to a \fBstatic struct utmp\fP on success, and NULL
 on failure.
+.SH NOTE
+The above functions getutent, setutent and others are not thread-safe and 
+the results can be unreliable if calls are mixed between multiple threads.
+.PP
+.nf
 .SH EXAMPLE
 The following example adds and removes a utmp record, assuming it is run
 from within a pseudo terminal.  For usage in a real application, you
Only in man-pages-1.48-getutent/man3: getutent.3.orig
Only in man-pages-1.48-getutent/man3: getutent.3~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]