[tor-bugs] #3049 [Tor Client]: Allow a Tor process to be ‘owned’ by a controller process

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Fri May 20 15:40:34 UTC 2011


#3049: Allow a Tor process to be ‘owned’ by a controller process
-------------------------+--------------------------------------------------
 Reporter:  rransom      |          Owner:  rransom           
     Type:  enhancement  |         Status:  needs_review      
 Priority:  major        |      Milestone:  Tor: 0.2.2.x-final
Component:  Tor Client   |        Version:                    
 Keywords:               |         Parent:                    
   Points:               |   Actualpoints:                    
-------------------------+--------------------------------------------------
Changes (by rransom):

  * status:  assigned => needs_review


Comment:

 Replying to [comment:16 nickm]:
 > Replying to [comment:15 rransom]:
 > > >  * Instead of having the functions take an event_base, you can just
 have them call tor_libevent_get_base.
 > > >  * For the timer, I'd suggest looking at periodic_timer_new; it's a
 little more accurate, and IMO makes our intent clearer.
 > >
 > > I want procmon.h and procmon.c to be easy for people to port to plain
 libevent 2.x, so that other Tor-related programs (e.g. protocol
 obfuscators) can implement the same process-ownership features that Tor
 has.  I'll leave in the `event_base` parameters in case someone else needs
 them, but using `periodic_timer_new` sounds good.
 >
 > Great.
 >
 > FWIW, if somebody's requiring Libevent 2, periodic_timer_new() isn't
 necessary: they can just add the EV_PERSIST flag to their timer events.
 The periodic_timer_new() function is there to make backward compatibility
 with libevent 1.x possible.

 I decided to not use `periodic_timer_new`, because procmon.c really should
 use a `struct event` directly someday when Libevent 2.17 learns to detect
 process termination for us.  I did use the `EV_PERSIST` flag on Libevent
 2, though.

 I've pushed an implementation of TAKEOWNERSHIP to the same branch; see
 also
 [https://gitweb.torproject.org/rransom/tor.git/shortlog/refs/heads/feature3049-v2
 feature3049-v2] ( !git://git.torproject.org/rransom/tor.git feature3049-v2
 ) for a pre-squashed version.  Still not tested on Windows.

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


More information about the tor-bugs mailing list