Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Patrick Palka <patrick@parcs.ath.cx>
To: Pedro Alves <palves@redhat.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Make sure terminal settings are restored before exiting
Date: Wed, 29 Jul 2015 11:39:00 -0000	[thread overview]
Message-ID: <CA+C-WL8ccZvJudLgiyPG65U3=LuGtyK8LAM96UF9dS=AeAfUXQ@mail.gmail.com> (raw)
In-Reply-To: <55B81606.6090706@redhat.com>

On Tue, Jul 28, 2015 at 7:53 PM, Pedro Alves <palves@redhat.com> wrote:
> (Small request: I find it helpful when the proposed commit
> log is always present in patch resubmissions, making patches
> self-contained.)

Sure, no problem.

>
>> diff --git a/gdb/top.c b/gdb/top.c
>> index 1e30b1c..6df987a 100644
>> --- a/gdb/top.c
>> +++ b/gdb/top.c
>> @@ -66,6 +66,7 @@
>>  #include "cli-out.h"
>>  #include "tracepoint.h"
>>  #include "inf-loop.h"
>> +#include "tui/tui.h"
>>
>>  extern void initialize_all_files (void);
>>
>> @@ -1494,6 +1495,14 @@ quit_force (char *args, int from_tty)
>>    int exit_code = 0;
>>    struct qt_args qt;
>>
>> +  /* Make sure that the terminal is left in the state we acquired it.  */
>> +  target_terminal_ours ();
>> +#if defined(TUI)
>> +  tui_disable ();
>> +#endif
>> +  if (async_command_editing_p)
>> +    gdb_disable_readline ();
>> +
>
> Can you put these new bits in a separate function, and call it here?
> That'll make it easier to reuse, or play with moving the call elsewhere,
> if needed.  As bonus, if we do the latter, git blame on the function's contents
> will still blame you.  :-)
>
> OK with that change.

Will do.


  reply	other threads:[~2015-07-29 11:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28  3:18 Patrick Palka
2015-07-28 22:20 ` Patrick Palka
2015-07-28 23:53   ` Pedro Alves
2015-07-29 11:39     ` Patrick Palka [this message]
2015-07-29  0:09 ` Pedro Alves
2015-07-29 11:38   ` Patrick Palka
2015-07-29 12:15     ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+C-WL8ccZvJudLgiyPG65U3=LuGtyK8LAM96UF9dS=AeAfUXQ@mail.gmail.com' \
    --to=patrick@parcs.ath.cx \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox