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