[tor-bugs] #10047 [Pluggable transport]: PTs could self-shutdown when they detect their stdout is closed
Tor Bug Tracker & Wiki
blackhole at torproject.org
Tue Oct 29 17:33:52 UTC 2013
#10047: PTs could self-shutdown when they detect their stdout is closed
---------------------------------+---------------------
Reporter: infinity0 | Owner: asn
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Pluggable transport | Version:
Keywords: | Actual Points:
Parent ID: | Points:
---------------------------------+---------------------
In [#9330] we were exploring solutions to signal a PT to do clean shutdown
on Windows. In [#10006] dcf suggested a workaround using JobObjects, which
has the nice property that the children shutdown even when their parent
crashes or is killed (SIGKILL or TerminateProcess).
This raises the valid point, why don't we try to achieve this for all
platforms? Since all PTs must already communicate via stdout back to Tor
(or any parent process, such as a PT chainer), one way of detecting parent
death is to check that stdout is still open.
Example: [http://compgroups.net/comp.unix.programmer/how-to-kill-all-
child-when-parent-exits/36841]
We'll need to research whether we must write to the stream to detect it's
closed, or if we can get away with doing something like poll or select.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/10047>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list