
Richard Pospesel pushed to branch tor-browser-102.6.0esr-12.0-1 at The Tor Project / Applications / Tor Browser Commits: dca7ddb7 by Pier Angelo Vendrame at 2023-01-10T19:18:47+00:00 fixup! Bug 40933: Add tor-launcher functionality Bug 41549: Correctly handle tor's stdout Subprocess.jsm manages stdout through a pipe, which we never emptied. As a result, it tor filled it completely, a lot of other stuff stalled. The previous implementation dumped tor's stdout to the browser's one, so this commit restores this behavior. (cherry picked from commit c20e9ad7c04325c67c7259d7bf69a7ff3e160466) - - - - - 1 changed file: - toolkit/components/tor-launcher/TorProcess.jsm Changes: ===================================== toolkit/components/tor-launcher/TorProcess.jsm ===================================== @@ -133,9 +133,10 @@ class TorProcess { arguments: this._args, environment, environmentAppend: true, - stderr: "pipe", + stderr: "stdout", }; this._subprocess = await Subprocess.call(options); + this._dumpStdout(); this._watchProcess(); this._status = TorProcessStatus.Running; this._torProcessStartTime = Date.now(); @@ -173,6 +174,16 @@ class TorProcess { this._didConnectToTorControlPort = true; } + async _dumpStdout() { + let string; + while ( + this._subprocess && + (string = await this._subprocess.stdout.readString()) + ) { + dump(string); + } + } + async _watchProcess() { const watched = this._subprocess; if (!watched) { View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/dca7ddb7... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/dca7ddb7... You're receiving this email because of your account on gitlab.torproject.org.
participants (1)
-
Richard Pospesel (@richard)