qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] curses: fixup SIGWINCH handler mess


From: Laszlo Ersek
Subject: Re: [Qemu-devel] [PATCH] curses: fixup SIGWINCH handler mess
Date: Tue, 12 Nov 2013 13:32:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131028 Thunderbird/17.0.10

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 via email to

[Prev in Thread] Current Thread [Next in Thread]