Re: BUG #8139: initdb: Misleading error message when current user not in /etc/passwd
От | Alvaro Herrera |
---|---|
Тема | Re: BUG #8139: initdb: Misleading error message when current user not in /etc/passwd |
Дата | |
Msg-id | 20130507181904.GA26800@eldon.alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: BUG #8139: initdb: Misleading error message when current user not in /etc/passwd (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: BUG #8139: initdb: Misleading error message when
current user not in /etc/passwd
|
Список | pgsql-bugs |
Tom Lane wrote: > nicolas@marchildon.net writes: > > The man page says: >=20 > > 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=20 > > 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 be= fore=20 > > the > > call. >=20 > 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. --=20 =C1lvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-bugs по дате отправления: