Skip to content

Commit

Permalink
fix(libtor): disable signal handlers to prevent shutdown on ctrl+c
Browse files Browse the repository at this point in the history
  • Loading branch information
sdbondi committed Feb 6, 2024
1 parent 740aa57 commit 9b91216
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions infrastructure/libtor/src/tor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ impl Tor {
tor.flag(TorFlag::DataDirectory(data_dir.clone()))
.flag(TorFlag::SocksPort(socks_port))
.flag(TorFlag::ControlPort(control_port))
// Disable signal handlers so that ctrl+c can be handled by our application
// https://github.com/torproject/torspec/blob/8961bb4d83fccb2b987f9899ca83aa430f84ab0c/control-spec.txt#L3946
.flag(TorFlag::Custom("__DisableSignalHandlers 1".to_string()))
.flag(TorFlag::Hush())
.flag(TorFlag::LogTo(log_level, LogDestination::File(log_destination)));

Expand Down

0 comments on commit 9b91216

Please sign in to comment.