Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15989

Re: Change in SIGTERM behaviour in bash 4.3 when using readline

From Chris Down <chris@chrisdown.name>
Newsgroups gnu.bash.bug
Subject Re: Change in SIGTERM behaviour in bash 4.3 when using readline
Date 2020-03-04 19:38 +0000
Message-ID <mailman.2050.1583350722.2412.bug-bash@gnu.org> (permalink)
References <20200304181824.GA394387@chrisdown.name> <20200304192918.GB394387@chrisdown.name> <20200304193834.GC394387@chrisdown.name>

Show all headers | View raw


Chris Down writes:
>I'm not quite sure how best to handle this, maybe setting SIG_IGN as 
>the default signal handler for interactive shells if there's nothing 
>to inherit? This is one of those cases where SA_RESTART doesn't quite 
>mimic SIG_IGN...

This seems too simple, so I assume it's going to cause other problems, but:

---
  jobs.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/jobs.c b/jobs.c
index e157c38f..a57b7082 100644
--- a/jobs.c
+++ b/jobs.c
@@ -4584,6 +4584,7 @@ initialize_job_signals ()
    if (interactive)
      {
        set_signal_handler (SIGINT, sigint_sighandler);
+      set_signal_handler (SIGTERM, SIG_IGN);
        set_signal_handler (SIGTSTP, SIG_IGN);
        set_signal_handler (SIGTTOU, SIG_IGN);
        set_signal_handler (SIGTTIN, SIG_IGN);
-- 
2.25.1



Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Change in SIGTERM behaviour in bash 4.3 when using readline Chris Down <chris@chrisdown.name> - 2020-03-04 19:38 +0000

csiph-web