[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] curses: fixup SIGWINCH handler mess
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH] curses: fixup SIGWINCH handler mess |
Date: |
Tue, 12 Nov 2013 13:16:22 +0100 |
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