qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org, Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [PATCH] curses: fixup SIGWINCH handler mess
Date: Tue, 12 Nov 2013 13:32:16 +0100	[thread overview]
Message-ID: <52821FD0.4050202@redhat.com> (raw)
In-Reply-To: <1384258582.1272.26.camel@nilsson.home.kraxel.org>

On 11/12/13 13:16, Gerd Hoffmann wrote:

>> justification for the patch.) My point though is that after this patch a
>> narrow window seems to exist where you can lose a signal, namely between
>> checking "got_sigwinch" and resetting it.
> 
> Doesn't matter.  The signal just says "terminal size has changed",
> typically as result of a xterm window resize.  Even if we get that twice
> we have to handle it only once, we just have to make sure this happens
> after the second signal came in.  Which is the case, as we reset
> got_sigwinch before going to handle it (query new size, tell curses).

Ah, correct. We do lose the second signal (the one which was delivered
between we retrieve the flag set by the first instance, and resetting
the flag), but at that point we're going to handle *one* resize event
anyway. Supposing that the second signal was generated *after* the
terminal size had changed for the second time, we'll see a recent enough
terminal size when we query it. So, we lose the second signal and the
*first* terminal size. Good.

Thanks!
Laszlo

  reply	other threads:[~2013-11-12 12:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-12  8:43 [Qemu-devel] [PATCH] curses: fixup SIGWINCH handler mess Gerd Hoffmann
2013-11-12 11:53 ` Laszlo Ersek
2013-11-12 12:16   ` Gerd Hoffmann
2013-11-12 12:32     ` Laszlo Ersek [this message]
2013-11-12 12:16   ` Paolo Bonzini

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=52821FD0.4050202@redhat.com \
    --to=lersek@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).