[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Restoring tty line settings after a trap
From: |
Chet Ramey |
Subject: |
Re: [Help-bash] Restoring tty line settings after a trap |
Date: |
Tue, 17 Jun 2014 10:26:44 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
On 6/16/14, 8:27 PM, Jesse Molina wrote:
>
> Hi everyone
>
> I have an issue with a bash script where if the user calls SIGINT via a
> ctrl+c, my trap gets called and the tty line settings don't get restored
> like they should, because they had been changed before trap was called, but
> not restored.
Thanks for the report. The trap exiting `short-circuits' the normal
terminal restoration process. Here's a patch that will undo readline's
terminal settings on the way out of the shell.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/
restore-term.patch
Description: Text Data