[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #1903 [Tor Client]: Teach Tor to control networks with tor-fw-helper.c



#1903: Teach Tor to control networks with tor-fw-helper.c
-------------------------+--------------------------------------------------
 Reporter:  ioerror      |       Owner:                     
     Type:  enhancement  |      Status:  needs_review       
 Priority:  normal       |   Milestone:  Deliverable-Sep2010
Component:  Tor Client   |     Version:  Tor: unspecified   
 Keywords:  upnp         |      Parent:  #1775              
-------------------------+--------------------------------------------------

Comment(by sjmurdoch):

 Nick,

 Thanks for your comments, I am working through them and my results can be
 found in the bug1903 branch of my Tor repository:
 git://git.torproject.org/sjm217/tor.git (N.B. I may rebase it, so it is
 not ready for merge yet). Most of your comments are straightforward to
 fix, but I have a question about one.

 ''11. What does fgets do when read() returns an EAGAIN in the middle of a
 line? Does it return a partial line, or wait for a newline?''

 I thought the latter, but the unit test I just added (dd66163) shows that
 it is the former :-( It looks like I need to write my own function to read
 a line from a non-blocking file descriptor.

 Alternatively, I did find fetch_from_buf_line() in buffers.c, but this
 deals with a buffer rather than a pipe. As far as I can tell, buffers.c
 uses recv() to read data rather than read(), which I don't think is
 guaranteed to work on a pipe.

 I am not sure which is the best way forward, so do you have a suggestion?

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/1903#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs