This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/6700] utmpname(3) returns interger but man page says void and doesnot returns with failure if file not found.
- From: "halesh dot s at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 27 Jun 2008 12:37:16 -0000
- Subject: [Bug libc/6700] utmpname(3) returns interger but man page says void and doesnot returns with failure if file not found.
- References: <20080627111826.6700.halesh.s@gmail.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From halesh dot s at gmail dot com 2008-06-27 12:37 -------
Hi Ulrich,
In the link
http://www.gnu.org/software/libtool/manual/libc/Manipulating-the-Database.html
It has mentioned that
"The utmpname function returns a value of 0 if the new name was successfully
stored, and a value of -1 to indicate an error. Note that utmpname does not try
to open the database, and that therefore the return value does not say anything
about whether the database can be successfully opened."
This means utmpname(3) never reports faiure if database doesnot exists.
In readutmp.c of coreutils it has mentioned
"Solaris' utmpname returns 1 upon success -- which is contrary to what the GNU
libc version does. In addition, older GNU libc versions are actually void."
But GNU libc utmpname returns -1 on failure, May it returns differen values on
success I think it does not causes any contrary with Solaris utmpname failure.
Even we did not open database can we include the database existance checking,
Will it causes any effects.
As mentioned above this may resolve who(1) problem, and which helps in
processing other commands based on who(1) o/p.
Thanks,
Halesh
--
http://sourceware.org/bugzilla/show_bug.cgi?id=6700
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.