bug-readline
[Top][All Lists]
Advanced

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

Re: Possible Readline bug


From: Chet Ramey
Subject: Re: Possible Readline bug
Date: Sun, 10 Jan 2021 13:37:21 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

On 1/8/21 7:17 PM, Cosmin Petrescu wrote:
Hello

      I was working with the Readline library on a linux basic shell and i found some unexpected behaviour with the unix_line_discard, kill_backward_line and kill_full_line functions. The program i am writing has a signal handler for ctrl+c and the purpose of it would be to "clear" the previous input considering that everything behind the ctrl+c is redundant.

If you try to call readline functions from a signal handler, in the middle
of readline handling the signal itsef, all bets are off. You can't reliably
do anything from a signal handler except set variables or call a small set
of signal-safe functions.

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



reply via email to

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