[tor-bugs] #21654 [Core Tor/Tor]: Don't use fgets() when we might get EAGAIN

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Mar 6 17:22:12 UTC 2017


#21654: Don't use fgets() when we might get EAGAIN
------------------------------+------------------------------
     Reporter:  nickm         |      Owner:
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:  Tor: unspecified
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+------------------------------
 Our tor_fgets() code, added in #20988, tries to make fgets() behave as we
 expect with nonblocking sockets.  But really, fgets() is not such a great
 choice for nonblocking sockets in the first place!  Let's use direct fd-
 level IO for those instead.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21654>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list