This is the ticket for the documentation side of the TOR_PT_EXIT_ON_STDIN_CLOSE and associated behavior that was implemented as part of #15435 (moved).
pt-spec.txt needs to document that if the env var is set to 1, then PTs should assume that tor will keep stdin open, and to treat stdin being closed as the same as a SIGTERM (graceful shutdown immediately).
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
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.
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:
Close stdin (and on U*IX, send a SIGTERM, PT behavior here is equivalent).
Wait for a grace period (~1 sec?)
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 (moved) since PTs that have their own children will have ample time to clean up.
There are some typo fixes that should be a separate commit.
+ 2.3. Extended ORPort- versions of this configuration protocol Tor supports. Clients+ versions of this configuration protocol Tor supports. Proxies- too while performing the managed proxy protocol:+ to while performing the managed proxy protocol:
A little typo "enviornment" (three times).
Instead of saying "by closing their listener ports, closing all existing connections, running other cleanup as required, and terminating" twice in two separate paragraphs, it's easier to understand if you first say what should happen on SIGTERM, and then say that if TOR_PT_EXIT_ON_STDIN_CLOSE=1, that stdin EOF has the same meaning as SIGTERM.