diff options
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c index 83dc87dfe8..836f4d665b 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -653,8 +653,10 @@ static int do_main_loop(void) { /* let catch() handle things like ^c, and otherwise don't worry about it */ if(poll_result < 0) { - if(errno != EINTR) { /* let the program survive things like ^z */ - log_fn(LOG_ERR,"poll failed: %s",strerror(errno)); + /* let the program survive things like ^z */ + if(tor_socket_errno(-1) != EINTR) { + log_fn(LOG_ERR,"poll failed: %s [%d]", + strerror(tor_socket_errno(-1)), tor_socket_errno(-1)); return -1; } else { log_fn(LOG_DEBUG,"poll interrupted."); |