1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-24 22:01:47 +03:00

fix: Update signal-hook to 0.3 and fix compilation errors

- Some functions are now under the `low_level` module, use that
This commit is contained in:
Jalil David Salamé Messina 2023-03-27 02:11:59 -03:00 committed by Wez Furlong
parent 344f133608
commit fc5e8b4f3d
3 changed files with 98 additions and 18 deletions

110
Cargo.lock generated
View File

@ -64,6 +64,12 @@ dependencies = [
"libc",
]
[[package]]
name = "anes"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
[[package]]
name = "anstyle"
version = "0.3.5"
@ -214,7 +220,7 @@ dependencies = [
"event-listener",
"futures-lite",
"libc",
"signal-hook 0.3.15",
"signal-hook",
"windows-sys 0.42.0",
]
@ -528,6 +534,33 @@ dependencies = [
"winapi",
]
[[package]]
name = "ciborium"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0c137568cc60b904a7724001b35ce2630fd00d5d84805fbb608ab89509d788f"
dependencies = [
"ciborium-io",
"ciborium-ll",
"serde",
]
[[package]]
name = "ciborium-io"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "346de753af073cc87b52b2083a506b38ac176a44cfb05497b622e27be899b369"
[[package]]
name = "ciborium-ll"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "213030a2b5a4e0c0892b6652260cf6ccac84827b83a85a534e178e3906c4cf1b"
dependencies = [
"ciborium-io",
"half 1.8.2",
]
[[package]]
name = "clap"
version = "2.34.0"
@ -539,6 +572,18 @@ dependencies = [
"unicode-width",
]
[[package]]
name = "clap"
version = "3.2.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5"
dependencies = [
"bitflags 1.3.2",
"clap_lex 0.2.4",
"indexmap",
"textwrap 0.16.0",
]
[[package]]
name = "clap"
version = "4.1.13"
@ -547,7 +592,7 @@ checksum = "3c911b090850d79fc64fe9ea01e28e465f65e821e08813ced95bced72f7a8a9b"
dependencies = [
"bitflags 1.3.2",
"clap_derive",
"clap_lex",
"clap_lex 0.3.3",
"is-terminal",
"once_cell",
"strsim",
@ -586,6 +631,15 @@ dependencies = [
"syn 2.0.10",
]
[[package]]
name = "clap_lex"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
dependencies = [
"os_str_bytes",
]
[[package]]
name = "clap_lex"
version = "0.3.3"
@ -867,7 +921,7 @@ dependencies = [
"atty",
"cast",
"clap 2.34.0",
"criterion-plot",
"criterion-plot 0.4.5",
"csv",
"itertools",
"lazy_static",
@ -884,6 +938,32 @@ dependencies = [
"walkdir",
]
[[package]]
name = "criterion"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7c76e09c1aae2bc52b3d2f29e13c6572553b30c4aa1b8a49fd70de6412654cb"
dependencies = [
"anes",
"atty",
"cast",
"ciborium",
"clap 3.2.23",
"criterion-plot 0.5.0",
"itertools",
"lazy_static",
"num-traits",
"oorandom",
"plotters",
"rayon",
"regex",
"serde",
"serde_derive",
"serde_json",
"tinytemplate",
"walkdir",
]
[[package]]
name = "criterion-plot"
version = "0.4.5"
@ -894,6 +974,16 @@ dependencies = [
"itertools",
]
[[package]]
name = "criterion-plot"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1"
dependencies = [
"cast",
"itertools",
]
[[package]]
name = "crossbeam"
version = "0.8.2"
@ -3931,7 +4021,7 @@ checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab"
name = "rangeset"
version = "0.1.0"
dependencies = [
"criterion",
"criterion 0.3.6",
"num",
]
@ -4514,16 +4604,6 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
[[package]]
name = "signal-hook"
version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e31d442c16f047a671b5a71e2161d6e68814012b7f5379d269ebd915fac2729"
dependencies = [
"libc",
"signal-hook-registry",
]
[[package]]
name = "signal-hook"
version = "0.3.15"
@ -4961,7 +5041,7 @@ dependencies = [
"base64 0.21.0",
"bitflags 2.0.2",
"cassowary",
"criterion",
"criterion 0.4.0",
"env_logger",
"filedescriptor",
"finl_unicode",

View File

@ -65,7 +65,7 @@ features = ["full-syntax"]
version = "0.3"
[target."cfg(unix)".dependencies]
signal-hook = "0.1"
signal-hook = "0.3"
termios = "0.3"
nix = "0.26"

View File

@ -232,7 +232,7 @@ impl UnixTerminal {
let input_queue = VecDeque::new();
let (sigwinch_pipe, sigwinch_pipe_write) = UnixStream::pair()?;
let sigwinch_id = signal_hook::pipe::register(libc::SIGWINCH, sigwinch_pipe_write)?;
let sigwinch_id = signal_hook::low_level::pipe::register(libc::SIGWINCH, sigwinch_pipe_write)?;
sigwinch_pipe.set_nonblocking(true)?;
let (wake_pipe, wake_pipe_write) = UnixStream::pair()?;
wake_pipe.set_nonblocking(true)?;
@ -532,7 +532,7 @@ impl Drop for UnixTerminal {
self.exit_alternate_screen().unwrap();
self.write.flush().unwrap();
signal_hook::unregister(self.sigwinch_id);
signal_hook::low_level::unregister(self.sigwinch_id);
self.write
.set_termios(&self.saved_termios, SetAttributeWhen::Now)
.expect("failed to restore original termios state");