[tor-bugs] #15545 [Pluggable transport]: Document TOR_PT_EXIT_ON_STDIN_CLOSE in the pt-spec.
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sun Apr 5 19:29:07 UTC 2015
#15545: Document TOR_PT_EXIT_ON_STDIN_CLOSE in the pt-spec.
-------------------------------------+--------------------------------
Reporter: yawning | Owner: yawning
Type: task | Status: needs_revision
Priority: normal | Milestone: Tor: 0.2.7.x-final
Component: Pluggable transport | Version:
Resolution: | Keywords: pt-spec pt-wants
Actual Points: | Parent ID:
Points: |
-------------------------------------+--------------------------------
Changes (by yawning):
* status: new => needs_revision
Comment:
Interesting, the current revision of pt-spec.txt doesn't mention the
SIGINT behavior at all. I guess this is ok, since it's not actually
implemented in the tor side code, and I don't really see a good case for
keeping it.
Anyway, this documents the PT termination behavior, including the shutdown
on close stuff:
https://github.com/Yawning/torspec/compare/bug15545
My plans going forward to bring some sanity to the PT shutdown process,
now that `TOR_PT_EXIT_ON_STDIN_CLOSE` exists is to change the tor side PT
teardown code to:
1. Close stdin (and on U*IX, send a `SIGTERM`, PT behavior here is
equivalent).
2. Wait for a grace period (~1 sec?)
3. If the child still is not dead, send a `SIGKILL`/`TerminateProcess()`.
I think that behavior reflects what's in the spec, is far more
portable/sane than what currently exists, and will fix #9330 since PTs
that have their own children will have ample time to clean up.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/15545#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list