mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-12 21:18:53 +00:00
parent
d3cfab1391
commit
107127afb7
3 changed files with 11 additions and 1 deletions
|
@ -324,7 +324,7 @@ int main(int argc, char **argv) {
|
||||||
program_name = L"fish";
|
program_name = L"fish";
|
||||||
set_main_thread();
|
set_main_thread();
|
||||||
setup_fork_guards();
|
setup_fork_guards();
|
||||||
|
signal_unblock_all();
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
fish_setlocale();
|
fish_setlocale();
|
||||||
|
|
||||||
|
|
|
@ -387,6 +387,13 @@ void signal_block(bool force) {
|
||||||
// debug( 0, L"signal block level increased to %d", block_count );
|
// debug( 0, L"signal block level increased to %d", block_count );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Ensure we did not inherit any blocked signals. See issue #3964.
|
||||||
|
void signal_unblock_all() {
|
||||||
|
sigset_t iset;
|
||||||
|
sigemptyset(&iset);
|
||||||
|
sigprocmask(SIG_SETMASK, &iset, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
void signal_unblock(bool force) {
|
void signal_unblock(bool force) {
|
||||||
if (!force && ignore_signal_block) return;
|
if (!force && ignore_signal_block) return;
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,9 @@ void signal_set_handlers();
|
||||||
/// default action (SIG_DFL) will be set
|
/// default action (SIG_DFL) will be set
|
||||||
void signal_handle(int sig, int do_handle);
|
void signal_handle(int sig, int do_handle);
|
||||||
|
|
||||||
|
/// Ensure we did not inherit any blocked signals. See issue #3964.
|
||||||
|
void signal_unblock_all();
|
||||||
|
|
||||||
/// Block all signals.
|
/// Block all signals.
|
||||||
void signal_block(bool force = false);
|
void signal_block(bool force = false);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue