On 1/14/20 11:24 AM, Martijn Dekker wrote:
Setting the following trap makes an interactive bash (any version) exit on issuing SIGINT:

trap 'trap "true" INT; kill -s INT $$; trap - INT; kill -s INT $$' INT
#     ^^^^^^^^^^^^^^^ eat signal       ^^^^^^^^^^ unset trap

After setting that trap, pressing Ctrl+C, or otherwise causing SIGINT to be sent, causes an interactive bash to exit.

Thanks for the report.

Chet


--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to