[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #15545 [Pluggable transport]: Document TOR_PT_EXIT_ON_STDIN_CLOSE in the pt-spec.
#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs