diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-04-17 22:38:39 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-04-17 22:38:39 +0000 |
commit | cf84759b4b51bfc42ef9b6b968e9704d9f3ddb6c (patch) | |
tree | cf430808102622f42b1f711fa45539079926f929 /src/or/main.c | |
parent | 769541ff7ed0f81fe7a9bdfa08ce6e962372b799 (diff) | |
download | tor-cf84759b4b51bfc42ef9b6b968e9704d9f3ddb6c.tar.gz tor-cf84759b4b51bfc42ef9b6b968e9704d9f3ddb6c.zip |
zero-out errno before calling event_dispatch, just in case we have misdiagnosed poll(2)/EINVAL bug.
svn:r4081
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c index b8268d62b4..b0d4252961 100644 --- a/src/or/main.c +++ b/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(); |