diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-11-28 05:48:02 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-11-28 05:48:02 +0000 |
commit | f77ff938b7774d45f106b0fa9d6b6a8bab176b72 (patch) | |
tree | e19b4d1ea291556c8e0d5e826b338df52f42d330 /src/or/main.c | |
parent | 9449ff73368974db10ae05c64b13a9ff0a02f25f (diff) | |
download | tor-f77ff938b7774d45f106b0fa9d6b6a8bab176b72.tar.gz tor-f77ff938b7774d45f106b0fa9d6b6a8bab176b72.zip |
remember; tor_socket_errno has side effects!
svn:r2997
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/main.c b/src/or/main.c index d22fc94426..dd05484411 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -869,11 +869,11 @@ static int do_main_loop(void) { /* let catch() handle things like ^c, and otherwise don't worry about it */ if (poll_result < 0) { + int e = tor_socket_errno(-1); /* let the program survive things like ^z */ - if(tor_socket_errno(-1) != EINTR) { + if(e != EINTR) { log_fn(LOG_ERR,"poll failed: %s [%d]", - tor_socket_strerror(tor_socket_errno(-1)), - tor_socket_errno(-1)); + tor_socket_strerror(e), e); return -1; } else { log_fn(LOG_DEBUG,"poll interrupted."); |