From bb7c96deb1a14ef7e8b51d5339a65a8064515c78 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Wed, 1 Jun 2016 16:34:49 +0100 Subject: gdb/remote-fileio.c: Eliminate custom SIGINT signal handler ... and fix Ctrl-C races. The current remote-fileio.c SIGINT/EINTR code can lose Ctrl-C -- there's a period where SIG_IGN is installed as signal handler, for example. Since: - remote.c no longer installs a custom SIGINT handler; - The current remote-fileio.c SIGINT handler is basically the same as the default SIGINT handler (event-top.c:handle_sigint), in principle, except that instead of setting the quit flag, it sets a separate flag. I think we should be able to completely remove the remote-fileio.c SIGINT handler, and centralize on the quit flag, thus fixing the Ctrl-C race. gdb/ChangeLog: yyyy-mm-dd Pedro Alves * remote-fileio.c (remote_fio_ctrl_c_flag, remote_fio_sa) (remote_fio_osa) (remote_fio_ofunc, remote_fileio_sig_init, remote_fileio_sig_set) (remote_fileio_sig_exit, remote_fileio_ctrl_c_signal_handler): Delete. (remote_fileio_o_quit_handler): New global. (remote_fileio_quit_handler): New function. (remote_fileio_reply): Check the quit flag instead of the custom 'remote_fio_ctrl_c_flag' flag. Restore the quit handler instead of changing the SIGINT handler. (do_remote_fileio_request): Override the quit handler instead of changing the SIGINT handler. --- gdb/ChangeLog | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'gdb/ChangeLog') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9d08c67..18261a7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,18 @@ +2016-06-01 Pedro Alves + + * remote-fileio.c (remote_fio_ctrl_c_flag, remote_fio_sa) + (remote_fio_osa) + (remote_fio_ofunc, remote_fileio_sig_init, remote_fileio_sig_set) + (remote_fileio_sig_exit, remote_fileio_ctrl_c_signal_handler): + Delete. + (remote_fileio_o_quit_handler): New global. + (remote_fileio_quit_handler): New function. + (remote_fileio_reply): Check the quit flag instead of the custom + 'remote_fio_ctrl_c_flag' flag. Restore the quit handler instead + of changing the SIGINT handler. + (do_remote_fileio_request): Override the quit handler instead of + changing the SIGINT handler. + 2016-06-01 Nick Clifton * common/common-utils.c (xmalloc_failed): New function. Provided -- cgit v1.1