[Mono-bugs] [Bug 72292][Nor] Changed - getpwent in libMonoPosixHelper fails on Solaris 8

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 7 Feb 2005 17:01:42 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by vargaz@gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=72292

--- shadow/72292	2005-02-07 15:55:20.000000000 -0500
+++ shadow/72292.tmp.25519	2005-02-07 17:01:41.000000000 -0500
@@ -58,6 +58,15 @@
 As an alternative fix, could you instead set errno = 0 before calling
 getpwent()?  I suspect errno is being set by setpwent() or some other
 code, and clearing out errno before getpwent() should remove the error
 value.
 
 At least that's what happens on SunOS 5.8.
+
+------- Additional Comments From vargaz@gmail.com  2005-02-07 17:01 -------
+That also seems to work. It is possible that the errno value is not set
+by getpwent, but by some other runtime function, so it might be a good
+idea to zero it out before other calls too, where its not possible to
+determine from the return value whenever a function failed or not.
+Manipulating the errno value from managed code makes little sense since
+the runtime might modify it any time.
+