This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Wake up interruptible_select in remote_fileio ctrl-c handler
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Wed, 01 Jun 2016 14:42:38 +0100
- Subject: Re: [PATCH] Wake up interruptible_select in remote_fileio ctrl-c handler
- Authentication-results: sourceware.org; auth=none
- References: <1463668660-9205-1-git-send-email-yao dot qi at linaro dot org> <86lh2pxq6a dot fsf at gmail dot com> <2102e16d-b52c-82da-6714-c536092dcb01 at redhat dot com>
Pedro Alves <palves@redhat.com> writes:
> Basically, my thinking for the patch was:
>
> - 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 priciple, except that instead of setting the quit flag,
> it sets a separate flag.
>
> - The current code can lose Ctrl-C -- there's a period
> where SIG_IGN is installed as signal handler, for example.
>
> I think we should be able to completely remove the remote-fileio.c
> SIGINT handler, and fix these corner cases, with the patch below.
>
Yes, that is completely the right way to go.
> +
> + /* If the user hit C-c before, pretend that it was hit right
> + here. */
> + QUIT;
Why do we need this?
--
Yao (éå)