From f790d8fa458aea6d5854386be40884a9599f0290 Mon Sep 17 00:00:00 2001 From: Leah Anderson Date: Sat, 5 Jul 2025 14:30:12 -0600 Subject: [PATCH] fix hexagon_launcher crashing --- Cargo.lock | 5 +++-- hexagon_launcher/Cargo.toml | 1 + hexagon_launcher/src/main.rs | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index af413db..42dccbb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1165,6 +1165,7 @@ dependencies = [ "clap", "color-eyre", "glam 0.25.0", + "libc", "manifest-dir-macros", "protostar", "serde", @@ -1365,9 +1366,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.158" +version = "0.2.174" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" [[package]] name = "libredox" diff --git a/hexagon_launcher/Cargo.toml b/hexagon_launcher/Cargo.toml index c90b4bb..9098c25 100644 --- a/hexagon_launcher/Cargo.toml +++ b/hexagon_launcher/Cargo.toml @@ -15,3 +15,4 @@ tokio = { workspace = true } serde = { workspace = true } stardust-xr-fusion = { workspace = true } stardust-xr-molecules = { workspace = true } +libc = "0.2.174" diff --git a/hexagon_launcher/src/main.rs b/hexagon_launcher/src/main.rs index 160fe44..e616fc7 100644 --- a/hexagon_launcher/src/main.rs +++ b/hexagon_launcher/src/main.rs @@ -34,10 +34,12 @@ const ACTIVATION_DISTANCE: f32 = 0.05; const DEFAULT_HEX_COLOR: Rgba = rgba_linear!(0.211, 0.937, 0.588, 1.0); const BTN_SELECTED_COLOR: Rgba = rgba_linear!(0.0, 1.0, 0.0, 1.0); const BTN_COLOR: Rgba = rgba_linear!(1.0, 1.0, 0.0, 1.0); - #[tokio::main(flavor = "current_thread")] async fn main() -> Result<()> { - color_eyre::install().unwrap(); + unsafe { + libc::signal(libc::SIGPIPE, libc::SIG_DFL); + } + color_eyre::install().unwrap(); tracing_subscriber::fmt() .with_env_filter(tracing_subscriber::EnvFilter::from_default_env()) .pretty() -- 2.49.1