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: [PATCH] Wake up interruptible_select in remote_fileio ctrl-c handler


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 (éå)


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