From: Ian Jackson Subject: Re: [PATCH] tools/xc: update tty detection in stdiostream_progress Date: Tue, 26 Feb 2013 17:37:45 +0000 Message-ID: <20780.62185.634588.412741@mariner.uk.xensource.com> References: <1b36a6c0a956cc94ddb0.1361563725@probook.site> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1b36a6c0a956cc94ddb0.1361563725@probook.site> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Olaf Hering Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Olaf Hering writes ("[Xen-devel] [PATCH] tools/xc: update tty detection in stdiostream_progress"): > tools/xc: update tty detection in stdiostream_progress > > As suggested by IanJ: > Check isatty only once to preserve the errno of ->progress users, and to > reduce the noice in strace output. > > Signed-off-by: Olaf Hering Thanks. But how did you test this ? It doesn't compile. Also I think it would be better to name the struct member something other than "isatty" since that's also the function name. In theory it should be OK but in practice I worry about compiler warnings etc. How about "tty" ? Ian.