Revert temporary hack
[mono.git] / support / grp.c
index 47749b2131cababc8c5411136dc13107dc43ce95..2f9ff351cc5311c35f9787058038573bd8173c79 100644 (file)
@@ -283,16 +283,18 @@ int
 Mono_Posix_Syscall_setgrent (void)
 {
        errno = 0;
-       setgrent ();
-       return errno == 0 ? 0 : -1;
+       do {
+               setgrent ();
+       } while (errno == EINTR);
+       mph_return_if_val_in_list5(errno, EIO, EMFILE, ENFILE, ENOMEM, ERANGE);
+       return 0;
 }
 
 int
 Mono_Posix_Syscall_endgrent (void)
 {
-       errno = 0;
        endgrent();
-       return errno == 0 ? 0 : -1;
+       return 0;
 }