Pārlūkot izejas kodu

zero-out errno before calling event_dispatch, just in case we have misdiagnosed poll(2)/EINVAL bug.

svn:r4081
Nick Mathewson 20 gadi atpakaļ
vecāks
revīzija
cf84759b4b
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5 0
      src/or/main.c

+ 5 - 0
src/or/main.c

@@ -925,6 +925,11 @@ static int do_main_loop(void) {
   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();