[Bug-readline] [readline patch, gdb-7.3?] Avoid free from a signal handler [Re: [PATCH] Make interrupting tab-completion safe.]

Jan Kratochvil jan.kratochvil@redhat.com
Wed Oct 19 20:30:00 GMT 2011


On Fri, 08 Jul 2011 16:26:21 +0200, Chet Ramey wrote:
> The most straightforward solution would be to move the signal setup into
> rl_callback_read_char, so readline's signal handlers are in place only
> when readline has control.  It's still important that the application
> call rl_callback_handler_remove to restore the original signal handlers.

Why to keep the signal handler installed after rl_callback_read_char returns
to its caller?

The application (GDB) can do some rl_stuff_char(3) if it sees SIGINT and call
rl_callback_read_char() then.  This way all the SIGINT-hooked operations do
not have to be executed from the signal handler.

But you may have solved it some way as you wrote now, thanks.


Regards,
Jan



More information about the Gdb-patches mailing list