David, is this bug preventing specific expected behavior from client-side transports right now? Assuming yes, can you give us some specifics? (E.g. "when meek-browser closes on the client side, Tor doesn't notice that it's finished so it doesn't report any problems to the user")
David, is this bug preventing specific expected behavior from client-side transports right now? Assuming yes, can you give us some specifics?
No, it's not causing any problems. On non-Windows platforms, tor sends a SIGTERM, which the client transport plugin can catch and terminate cleanly. On Windows, tor has no choice but to call TerminateProcess, which doesn't give the child process a chance to terminate cleanly. Unclean termination isn't a problem for obfs4proxy, because it doesn't manage any external resources. Unclean termination is a problem for meek-client, because meek-client starts its own child processes that would be left orphaned. That's the reason for the now three-year-old terminateprocess-buffer hack, which interposes a process between tor and meek-client that absorbs TerminateProcess and allows meek-client to terminate cleanly. [[comment:21:ticket:15435|I thought]] we would be able to get rid of terminateprocess-buffer eventually, once tor started supporting TOR_PT_EXIT_ON_STDIN_CLOSE for clients. But it turns out that hasn't happened yet.
It just seems like an oversight, as there's nothing in the spec that says it's only for server transports. I know I always anticipated that it would work for clients as well, and was surprised to learn that it wasn't the case.
(E.g. "when meek-browser closes on the client side, Tor doesn't notice that it's finished so it doesn't report any problems to the user")
You have it backwards: TOR_PT_EXIT_ON_STDIN_CLOSE is for tor to tell a child process to terminate, not to detect when a child process has decided to terminate on its own.
For what it's worth, it's probably fine to just assume that the behavior indicated by the env var is present (or gate it behind a command line option or something), since the main reason the env var exists is to indicate that the tor daemon will maintain stdin (it used to close it immediately prior to exec).
Any semi-modern build of tor will do the right thing there.
In the future, please submit Github pull requests if possible for tor.git since this makes it much easier for us to review after our Travis CI and Appveyor CI have run on the pull request :-)