Date: Wed, 16 Jan 2008 07:20:02 GMT From: Giorgos Keramidas <keramida@FreeBSD.org> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/119705: [PATCH] make iostat a bit smarter about the number of tty rows Message-ID: <200801160720.m0G7K2G9073040@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/119705; it has been noted by GNATS. From: Giorgos Keramidas <keramida@freebsd.org> To: Maxim Konovalov <maxim@macomnet.ru> Cc: Bruce Evans <bde@freebsd.org>, 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 <maxim@macomnet.ru> 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 :)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801160720.m0G7K2G9073040>