From 15361f62edd59ada2832d20f06c761452a685c7c Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Mon, 3 Jul 2023 13:55:37 -0700 Subject: [PATCH] signal.rs to stop using wperror This needed to cross the ffi which is annoying in tests. Use the Rust perror() instead. --- fish-rust/src/signal.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fish-rust/src/signal.rs b/fish-rust/src/signal.rs index 7a9e6b434..3fa4413e0 100644 --- a/fish-rust/src/signal.rs +++ b/fish-rust/src/signal.rs @@ -6,7 +6,7 @@ use crate::topic_monitor::{generation_t, invalid_generations, topic_monitor_principal, topic_t}; use crate::wchar::{wstr, WExt, L}; use crate::wchar_ffi::{AsWstr, WCharToFFI}; -use crate::wutil::{fish_wcstoi, wgettext, wgettext_str, wperror}; +use crate::wutil::{fish_wcstoi, perror, wgettext, wgettext_str}; use cxx::{CxxWString, UniquePtr}; use errno::{errno, set_errno}; use std::sync::atomic::{AtomicI32, Ordering}; @@ -278,7 +278,7 @@ pub fn signal_set_handlers(interactive: bool) { act.sa_sigaction = fish_signal_handler as usize; act.sa_flags = libc::SA_SIGINFO | libc::SA_RESTART; if sigaction(libc::SIGCHLD, &act, nullptr) != 0 { - wperror(L!("sigaction")); + perror("sigaction"); exit_without_destructors(1); }