Tom Lane wrote:
> nico...@marchildon.net writes:

> > The man page says:
> 
> > RETURN VALUE
> >        The  getpwnam()  and  getpwuid() functions return a pointer to a
> > passwd
> >        structure, or NULL if the matching entry  is  not  found  or  an 
> > error
> >        occurs.   If an error occurs, errno is set appropriately.  If one
> > wants
> >        to check errno after the call, it should be  set  to  zero  before 
> > the
> >        call.
> 
> AFAICS, getpwuid is not honoring its specification here: it failed to
> set errno.  I don't see that suppressing the strerror result would add
> anything much.

Well, in this case no error occured, but no matching entry was found.
The wording in the manpage is explicit that there not being an entry is
not an error.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to