[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] zero-out errno before calling event_dispatch, just in case ...



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();