[or-cvs] zero-out errno before calling event_dispatch, just in case ...
Nick Mathewson
nickm at seul.org
Sun Apr 17 22:38:41 UTC 2005
Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv28778/src/or
Modified Files:
main.c
Log Message:
zero-out errno before calling event_dispatch, just in case we have misdiagnosed poll(2)/EINVAL bug.
Index: main.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.486
retrieving revision 1.487
diff -u -d -r1.486 -r1.487
--- main.c 8 Apr 2005 06:16:09 -0000 1.486
+++ main.c 17 Apr 2005 22:38:39 -0000 1.487
@@ -925,6 +925,11 @@
for (;;) {
if (nt_service_is_stopped())
return 0;
+
+#ifndef MS_WINDOWS
+ /* Make it easier to tell whether libevent failure is our fault or not. */
+ errno = 0;
+#endif
/* poll until we have an event, or the second ends */
loop_result = event_dispatch();
More information about the tor-commits
mailing list