From: Gerd Hoffmann <kraxel@redhat.com>
To: Laszlo Ersek <lersek@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:16:22 +0100 [thread overview]
Message-ID: <1384258582.1272.26.camel@nilsson.home.kraxel.org> (raw)
In-Reply-To: <528216C7.10705@redhat.com>
Hi,
> > +static bool got_sigwinch;
>
> The type "volatile sig_atomic_t" would be more pedantic
> <http://pubs.opengroup.org/onlinepubs/9699919799//functions/V2_chap02.html#tag_15_04_03_03>.
Will do for v2.
Hmm, checkpatch barfs on "volatile", with a reference which looks linux
kernel related ...
> >
> > resize_term(ws.ws_row, ws.ws_col);
> > - curses_calc_pad();
>
> Are you removing this call because we're setting "invalidate" below, and
> the (new) caller of this function, curses_refresh(), calls
> curses_calc_pad() on nonzero "invalidate" anyway?
Exactly.
> 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).
cheers,
Gerd
next prev parent reply other threads:[~2013-11-12 12:16 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 [this message]
2013-11-12 12:32 ` Laszlo Ersek
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=1384258582.1272.26.camel@nilsson.home.kraxel.org \
--to=kraxel@redhat.com \
--cc=aliguori@amazon.com \
--cc=lersek@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).