bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Chris Down
Subject: Re: Change in SIGTERM behaviour in bash 4.3 when using readline
Date: Wed, 4 Mar 2020 19:29:18 +0000

Ah, it's been a while since I did this and I forgot about the granularity of the devel branch :-)

There it bisects to 73a146bec7f75da9f78f6d54329c980b75a2318d ("commit bash-20130215 snapshot"). I'm pretty sure it's related to this change to add the signal handler inside initialize_shell_signals, which sets a new handler if SIGTERM isn't SIG_HARD_IGNORE.

If I read the code correctly, in that case we will resume due to SA_RESTART, but bubbling up readline() will now return 0, which will be passed to yy_readline_get(), which returns EOF if current_readline_line is 0, so the shell closes.

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...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]