diff options
author | Jonathan Pryor <jpryor@novell.com> | 2007-06-27 17:43:21 +0400 |
---|---|---|
committer | Jonathan Pryor <jpryor@novell.com> | 2007-06-27 17:43:21 +0400 |
commit | 81350af83e8801701c5ab7a4e790f3708604f088 (patch) | |
tree | ca13ef0ca694e144d0efa23d8d1423376f885239 /support/pwd.c | |
parent | cc884fc062336b7447634abd092acf97ae7693f1 (diff) |
* grp.c, pwd.c: Only return failure if a documented errno is encountered.
This fixes UnixUserInfo.GetLocalUsers() and UnixGroupInfo.GetLocalGroups()
on systems missing the file /etc/default/nss (which generates ENOENT,
which isn't documented, so therefore it's not a "real" error).
* mph.h: Add mph_return_if_val_in_list5().
svn path=/trunk/mono/; revision=80868
Diffstat (limited to 'support/pwd.c')
-rw-r--r-- | support/pwd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/support/pwd.c b/support/pwd.c index 2e0b373cf29..8eb27ef5ef7 100644 --- a/support/pwd.c +++ b/support/pwd.c @@ -237,8 +237,11 @@ int Mono_Posix_Syscall_setpwent (void) { errno = 0; - setpwent (); - return errno == 0 ? 0 : -1; + do { + setpwent (); + } while (errno == EINTR); + mph_return_if_val_in_list5(errno, EIO, EMFILE, ENFILE, ENOMEM, ERANGE); + return 0; } int |