Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Chris Down Newsgroups: gnu.bash.bug Subject: Change in SIGTERM behaviour in bash 4.3 when using readline Date: Wed, 4 Mar 2020 18:18:24 +0000 Lines: 28 Approved: bug-bash@gnu.org Message-ID: References: <20200304181824.GA394387@chrisdown.name> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Trace: usenet.stanford.edu 1583345912 30575 209.51.188.17 (4 Mar 2020 18:18:32 GMT) X-Complaints-To: action@cs.stanford.edu To: bug-bash@gnu.org Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:subject:message-id:mime-version:content-disposition; bh=CpW8HfW2FHUB9Rr987SRe+j7mTt+LKn4As9YTW/UtRA=; b=NMEGotuueUD4EFTN24a+Jsmbvl0xpU84XEAA2AZDeA+anFFhJV4nELfKo/z50tks8y Wn70GAikCCWCEsytLbFzXcAxJgjcKrWub6zkAuk1XC4iflKHXu90O7GbcPvNND2Sa08A GVTM/RwhfVlaR9DsK8FQP6SIQJ0Y4rOjA1f6U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=CpW8HfW2FHUB9Rr987SRe+j7mTt+LKn4As9YTW/UtRA=; b=X/mEjRzlyrptjXdU4erJ6JsAxrr4CrH3mR2yFMIfdEX/4pWAfdzIow9hijY/uD1q3m ZAkbWjRFoEEXGAiS2EPQqD3ZKRzKAsKgHOVTDd+qGRY9ZB6wFJvYbzly9SpGfn3ZYX3c d7DWq/1DvKwoYUeE5TuKoqUAfzoSUeOwZJ9jiyGLMmuhk0r/ZuzLUAtVZerI9l1IEv4/ nYG0V5CSouPfSmkjPVdO7oueeBAeNahQYk/85dJh/NoBfNnXXsCi8P51Xd32hpZCIz3g Wtk2nblcX0SlIMbkibiYaYcS5nDye3M1dGRXtTnLvlgOggBmwllK8k2IEtL54/1uVDRK Pj1w== X-Gm-Message-State: ANhLgQ18HJ1CWJKK85ofUw9JX9uHF/UPZiDZ63mBf/UrhKk+T7CbORK1 Uy99kCbLG0DeuGm7MS/Y0UXmq5O2d792Mg== X-Google-Smtp-Source: ADFU+vuPadHLNoIbGAYa02A8xL7ER0qEM7qYGUU/x8htUeHmiTSFP2QxTyJAgnDfz0AIF1oR9TxsJw== X-Received: by 2002:a5d:550f:: with SMTP id b15mr5276913wrv.19.1583345905842; Wed, 04 Mar 2020 10:18:25 -0800 (PST) Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <20200304181824.GA394387@chrisdown.name> Xref: csiph.com gnu.bash.bug:15987 Hi there, A question on Unix & Linux Stack Exchange[0] brought up the question of SIGTERM terminating interactive bash shells. This surprised me, and after bisecting I narrowed it down to commit ac50fbac ("Bash-4.3 distribution sources and documentation"). Going through the commit I see a significant number of changes, like the addition of setting/checking the sigterm_received atomic in a number of places, and the special handling of some signals (including SIGTERM) as part of deciding whether to call rl_signal_event_hook. It seems this behaviour is related to readline, because it goes away if I run with --noediting. Before I spend the time to look through the code to work out exactly which part of ac50fbac results in this behaviour, since it's fairly substantial, I want to double check -- was this an intentional change or not? I can't really tell from CHANGES or NEWS: they mention some of the compile-time options around SIGTERM and rl_signal_event_hook, but I can't really tell the intent when it comes to this behaviour in particular. Certainly it came as a surprise to me, at least. Thanks, Chris 0: https://unix.stackexchange.com/q/571123/10762