[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
Mon May 16 16:03:38 UTC 2011
#3049: Allow a Tor process to be ‘owned’ by a controller process
-------------------------+--------------------------------------------------
Reporter: rransom | Owner: rransom
Type: enhancement | Status: assigned
Priority: major | Milestone: Tor: 0.2.2.x-final
Component: Tor Client | Version:
Keywords: | Parent:
Points: | Actualpoints:
-------------------------+--------------------------------------------------
Comment(by 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.
> > * In monitor_owning_controller_process, if we're going to make a
failure to allocate owning_controller_process_monitor be a recoverable
error, we should make sure that it frees and clears
owning_controller_process_spec so that the two are consistent again. On
the other hand, if we ''don't'' plan to make it a recoverable error, then
the log message should be log_err.
>
> It should be an explicitly unrecoverable error, even though
`tor_process_monitor_new` cannot currently return NULL.
Okay, sounds like log_err() then.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/3049#comment:16>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list