GNU bug report logs - #13498
"cut -f" lags a line

Previous Next

Package: coreutils;

Reported by: Scott Lamb <slamb <at> slamb.org>

Date: Sat, 19 Jan 2013 17:27:01 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 13498 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Scott Lamb <slamb <at> slamb.org>
Cc: 13498 <at> debbugs.gnu.org
Subject: Re: bug#13498: "cut -f" lags a line
Date: Sat, 19 Jan 2013 21:04:59 +0100
Scott Lamb <slamb <at> slamb.org> writes:

> I don't know exactly why the behavior differs based on stdin being a
> tty or not. My best guess is that glibc might have some logic that, if
> stdin is a tty, automatically flushes stdout any time the program
> blocks on stdin.

When a new buffer is read for a line buffered or unbuffered stream,
stdout is flushed.  This is traditional Unix behaviour, but AFAIK not
required by any standard.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




This bug report was last modified 10 years and 363 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.