Permalink
Browse files

Fixes a close()+EINTR bug

close() shouldn't try to handle EINTR:
http://alobbs.com/post/54503240599/close-and-eintr
  • Loading branch information...
1 parent 9cc5f06 commit 16116e6b85bb2392688f315bfa49329546ecb50e @alobbs alobbs committed Jul 3, 2013
Showing with 2 additions and 4 deletions.
  1. +2 −4 cherokee/util.c
View
@@ -1654,13 +1654,11 @@ cherokee_fd_close (int fd)
return ret_error;
}
- do {
#ifdef _WIN32
- re = closesocket (fd);
+ re = closesocket (fd);
#else
- re = close (fd);
+ re = close (fd);
#endif
- } while ((re == -1) && (errno == EINTR));
TRACE (ENTRIES",close_fd", "fd=%d re=%d\n", fd, re);
return (re == 0) ? ret_ok : ret_error;

1 comment on commit 16116e6

Member

skinkie commented on 16116e6 Jul 5, 2013

Thanks. I wanted to ask if it had any impact on Cherokee.

Please sign in to comment.