[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] readline does not always handle SIGTERM on reboot
From: |
Chet Ramey |
Subject: |
Re: [Help-bash] readline does not always handle SIGTERM on reboot |
Date: |
Mon, 9 Apr 2018 13:51:24 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 4/9/18 12:55 PM, john smith wrote:
>> I don't run busybox, so I won't speculate. My first guess would be that
>> the signal comes in while bash is ignoring SIGTERM (by catching the signal
>> and discarding it).
>
> I've analyzed bash and readline during the weekend and I learned that
> readline() overwrites bash SIGTERM handler and restores it after it
> finishes, this is why `kill $$' does not kill the current session but
> `(sleep 1; kill $$) &' does.
You left out the part where readline resends the signal to the calling
application, assuming the calling application hasn't set the signal
handler to SIG_IGN (in which case readline would not install a handler
for it at all).
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU address@hidden http://tiswww.cwru.edu/~chet/
- [Help-bash] readline does not always handle SIGTERM on reboot, john smith, 2018/04/06
- Re: [Help-bash] readline does not always handle SIGTERM on reboot, Chet Ramey, 2018/04/06
- Re: [Help-bash] readline does not always handle SIGTERM on reboot, john smith, 2018/04/06
- Re: [Help-bash] readline does not always handle SIGTERM on reboot, Chet Ramey, 2018/04/06
- Re: [Help-bash] readline does not always handle SIGTERM on reboot, john smith, 2018/04/06
- Message not available
- Message not available
- Re: [Help-bash] readline does not always handle SIGTERM on reboot, john smith, 2018/04/06
- Re: [Help-bash] readline does not always handle SIGTERM on reboot, john smith, 2018/04/07
- Re: [Help-bash] readline does not always handle SIGTERM on reboot, Chet Ramey, 2018/04/09
- Re: [Help-bash] readline does not always handle SIGTERM on reboot, Chet Ramey, 2018/04/09
- Re: [Help-bash] readline does not always handle SIGTERM on reboot, john smith, 2018/04/09
- Re: [Help-bash] readline does not always handle SIGTERM on reboot,
Chet Ramey <=
- Re: [Help-bash] readline does not always handle SIGTERM on reboot, john smith, 2018/04/09
- Re: [Help-bash] readline does not always handle SIGTERM on reboot, Chet Ramey, 2018/04/09