[tor-commits] [tor-launcher/master] Bug #10382: Tor Launcher hang on quit.
brade at torproject.org
brade at torproject.org
Fri Dec 13 03:31:11 UTC 2013
commit 130d036a14855dfd8946bfb3e689f7543306b533
Author: Kathy Brade <brade at pearlcrescent.com>
Date: Thu Dec 12 22:29:03 2013 -0500
Bug #10382: Tor Launcher hang on quit.
Avoid sending anything to the tor control port while the browser is quitting
Instead, rely on the TAKEOWNERSHIP feature to ensure that tor shuts down when
the browser does.
---
src/components/tl-process.js | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/components/tl-process.js b/src/components/tl-process.js
index d1166a2..660588d 100644
--- a/src/components/tl-process.js
+++ b/src/components/tl-process.js
@@ -101,16 +101,20 @@ TorProcessService.prototype =
this.mObsSvc.removeObserver(this, kBootstrapStatusTopic);
if (this.mTorProcess)
{
- TorLauncherLogger.log(4, "Shutting down tor process (pid "
+ // We now rely on the TAKEOWNERSHIP feature to shut down tor when we
+ // close the control port connection.
+ //
+ // Previously, we sent a SIGNAL HALT command to the tor control port,
+ // but that caused hangs upon exit in the Firefox 24.x based browser.
+ // Apparently, Firefox does not like to process socket I/O while
+ // quitting if the browser did not finish starting up (e.g., when
+ // someone presses the Quit button on our Network Settings or progress
+ // window during startup).
+ TorLauncherLogger.log(4, "Disconnecting from tor process (pid "
+ this.mTorProcess.pid + ")");
-
- var reply = this.mProtocolSvc.TorSendCommand("SIGNAL", "HALT");
- if (!this.mProtocolSvc.TorCommandSucceeded(reply))
- this.mTorProcess.kill();
+ this.mProtocolSvc.TorCleanupConnection();
this.mTorProcess = null;
-
- this.mProtocolSvc.TorCleanupConnection();
}
}
else if (("process-failed" == aTopic) || ("process-finished" == aTopic))
More information about the tor-commits
mailing list