[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
Thu May 12 04:29:41 UTC 2011


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

Comment(by nickm):

 BTW, you'll want to have the option named __OwningControllerPID so that
 SAVECONF never writes it to a file, and so that it's treated as for-use-
 by-controllers.

 I'm not sure how you go about implementing that feature, fwiw.  Is there a
 standard way to watch for a process with a particular pid to change its
 status?  waitpid() and friends seem to only be for child processes.  You
 can kill(0) the pid, but that doesn't tell you if *that* process is still
 there: it only tells you if some process with that pid is still there.

 On BSDish systems, you can use kevent to wait for a process, but I don't
 believe libevent exposes that atm.  On linuxy systems, you could pull the
 process's start time out of /proc/[pid]/stat and see whether it's changed
 or somethign.  On Windows, you can grab a handle to the process somehow
 and poll it from time to time to see whether it's been signalled.... but
 all of these approaches seem pretty heavyweight atm.

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


More information about the tor-bugs mailing list