From owner-freebsd-bugs@FreeBSD.ORG Wed Jan 16 07:20:03 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 308CF16A418 for ; Wed, 16 Jan 2008 07:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1454A13C45D for ; Wed, 16 Jan 2008 07:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m0G7K2dW073041 for ; Wed, 16 Jan 2008 07:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m0G7K2G9073040; Wed, 16 Jan 2008 07:20:02 GMT (envelope-from gnats) Date: Wed, 16 Jan 2008 07:20:02 GMT Message-Id: <200801160720.m0G7K2G9073040@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Giorgos Keramidas Cc: Subject: Re: bin/119705: [PATCH] make iostat a bit smarter about the number of tty rows X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Giorgos Keramidas List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2008 07:20:03 -0000 The following reply was made to PR bin/119705; it has been noted by GNATS. From: Giorgos Keramidas To: Maxim Konovalov Cc: Bruce Evans , bug-followup@freebsd.org Subject: Re: bin/119705: [PATCH] make iostat a bit smarter about the number of tty rows Date: Wed, 16 Jan 2008 09:13:28 +0200 On 2008-01-16 09:29, Maxim Konovalov wrote: > Hi Giorgos, > It seems for me you forget to clear wresized flag -- I added > printf("%s\n", __func__); at the beginning of doresize() to notice > this. Indeed. Thanks for catching this. > IMHO the isatty() check doesn't belong to a pseudo signal handler > doresize(). Install SIGWINCH handler if and only if stdout is a tty. That's a good suggestion too, and it will save one isatty() call for each SIGWINCH delivery. I'll update the patch and follow-up with a second version in the PR. Nice... > Do you have plans to add this feature to netstat, vmstat and all other > similar tools? :-) That didn't occur to me, but it's probably a good idea :)