From e30f3fee88308f867eb83cd497f38c12ed1aab70 Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Wed, 22 Feb 2017 21:53:49 -0800 Subject: [PATCH] make not blocking signals the default This is the next step in determining whether we can disable blocking signals without a good reason to do so. This makes not blocking signals the default behavior. If someone finds a problem they can add this to their ~/config/fish/config.fish file: set FISH_NO_SIGNAL_BLOCK 0 Alternatively set that env var before starting fish. I won't be surprised if people report problems. Till now we have relied on people opting in to this behavior to tell us whether it causes problems. This makes the experimental behavior the default that has to be opted out of. This will give is a lot more confidence this change doesn't cause major problems prior to the next minor release. --- src/fish.cpp | 2 +- src/signal.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fish.cpp b/src/fish.cpp index eeafa5591..143d338f0 100644 --- a/src/fish.cpp +++ b/src/fish.cpp @@ -408,7 +408,7 @@ int main(int argc, char **argv) { // TODO: Remove this once we're confident that not blocking/unblocking every signal around // some critical sections is no longer necessary. env_var_t fish_no_signal_block = env_get_string(L"FISH_NO_SIGNAL_BLOCK"); - if (!fish_no_signal_block.missing()) ignore_signal_block = true; + if (!fish_no_signal_block.missing_or_empty() && !from_string(fish_no_signal_block)) ignore_signal_block = false; // Stomp the exit status of any initialization commands (issue #635). proc_set_last_status(STATUS_BUILTIN_OK); diff --git a/src/signal.cpp b/src/signal.cpp index 8fe2bd2d8..8c4f994ae 100644 --- a/src/signal.cpp +++ b/src/signal.cpp @@ -17,7 +17,7 @@ #include "wutil.h" // IWYU pragma: keep // This is a temporary var while we explore whether signal_block() and friends is needed. -bool ignore_signal_block = false; +bool ignore_signal_block = true; /// Struct describing an entry for the lookup table used to convert between signal names and signal /// ids, etc.