Close child's stdin to signal exit in meek-client-torbrowser
Moved from #24642 (moved).
Another (possibly better) option is to call
cmd.StdinPipe()
and just never close the pipe (that way the child process's stdin is separate from the parent's, so you don't have a race between them trying to terminate when the stdin is closed).
The bug24642 branch uses the
StdinPipe
idea.I'm not totally happy with it, because ideally according to pt-spec, we should keep track of the stdin handle, and close it before sending anything like SIGTERM to the subprocess. But that would require more rewriting and is more than you need right now.