This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]