[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] zero-out errno before calling event_dispatch, just in case ...
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] zero-out errno before calling event_dispatch, just in case ...
- From: nickm@xxxxxxxx (Nick Mathewson)
- Date: Sun, 17 Apr 2005 18:38:41 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sun, 17 Apr 2005 18:39:02 -0400
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
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();