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

Re: [tor-bugs] #23900 [Core Tor/Tor]: Let programs call tor_main with a preconstructed control socket



#23900: Let programs call tor_main with a preconstructed control socket
-------------------------------------------------+-------------------------
 Reporter:  nickm                                |          Owner:  nickm
     Type:  enhancement                          |         Status:
                                                 |  merge_ready
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.3.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-mobile, review-group-24, s8-api  |  Actual Points:
Parent ID:  #23684                               |         Points:
 Reviewer:                                       |        Sponsor:
                                                 |  Sponsor8
-------------------------------------------------+-------------------------

Comment (by nickm):

 Replying to [comment:10 sbs]:
 > I was also wondering:
 >
 > 1. assuming that `tor_socket_t` is similar to `evutil_socket_t`, whether
 we can pass a socket on Windows to obtain the same effect

 They're similar, but it's going to be a little hacking to get this working
 on windows: Sockets aren't treated as fds in a nice inheritable way on
 Windows.  But in-process, it should work fine, if we make a fake
 socketpair with the usual tricks.

 > 2. if this function to set an owning socket is thread safe (I don't know
 enough on Tor internals to say whether it's obviously thread safe or not)

 It should only ever be called from the Tor main thread, so it should be
 safe.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23900#comment:12>
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