bug-readline
[Top][All Lists]
Advanced

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

Re: Use of rl_echo_signal_char in _rl_handle_signal


From: Chet Ramey
Subject: Re: Use of rl_echo_signal_char in _rl_handle_signal
Date: Mon, 26 Jun 2023 13:43:42 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

On 6/22/23 11:57 AM, Andrew Burgess wrote:

That test needs to be augmented with a condition that won't be true unless
callback mode is actually active. You should be able to test
RL_STATE_CALLBACK using RL_ISSTATE(), but you might also want to test
whether rl_linefunc is non-null. Let me know what works for you.

Looking at the code I think that RL_ISSTATE (RL_STATE_CALLBACK) will be
true only when rl_linefunc != NULL and vice versa, so I think just
checking one of these will be fine.

The patch below calls rl_echo_signal_char when RL_STATE_CALLBACK is not
set, or when rl_persistent_signal_handlers is true, which I think covers
all the cases.

OK, we'll try this one.

Chet

--
``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]