From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgCtX-0000bO-GV for qemu-devel@nongnu.org; Tue, 12 Nov 2013 07:16:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VgCtS-0000m7-Hu for qemu-devel@nongnu.org; Tue, 12 Nov 2013 07:16:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:31972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgCtS-0000je-9t for qemu-devel@nongnu.org; Tue, 12 Nov 2013 07:16:30 -0500 Message-ID: <1384258582.1272.26.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Tue, 12 Nov 2013 13:16:22 +0100 In-Reply-To: <528216C7.10705@redhat.com> References: <1384245814-15010-1-git-send-email-kraxel@redhat.com> <528216C7.10705@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] curses: fixup SIGWINCH handler mess List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: qemu-devel@nongnu.org, Anthony Liguori Hi, > > +static bool got_sigwinch; > > The type "volatile sig_atomic_t" would be more pedantic > . 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