GNU bug report logs - #31225
undocumented change in tail in 8.28 (pipe output monitoring)

Previous Next

Package: coreutils;

Reported by: "Dr. Thomas Orgis" <thomas.orgis <at> uni-hamburg.de>

Date: Fri, 20 Apr 2018 14:57:03 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 31225 in the body.
You can then email your comments to 31225 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#31225; Package coreutils. (Fri, 20 Apr 2018 14:57:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Dr. Thomas Orgis" <thomas.orgis <at> uni-hamburg.de>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Fri, 20 Apr 2018 14:57:03 GMT) Full text and rfc822 format available.

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

From: "Dr. Thomas Orgis" <thomas.orgis <at> uni-hamburg.de>
To: bug-coreutils <at> gnu.org
Subject: undocumented change in tail in 8.28 (pipe output monitoring)
Date: Fri, 20 Apr 2018 16:56:23 +0200
[Message part 1 (text/plain, inline)]
Hi all,

during debugging of a background process issue where I have tail -f
feeding into a pipe, I was surprised by a change in tail introduced in
release 8.28 of GNU coreutils: The monitoring of the output pipe and
silent exit of tail e.g. in the case of

	tail -f /dev/null | true

. This differs from earlier versions and also from BSD, for example. I
see some subtle portability bugs here. One one platform, killing the
end of a pipe fed by tail will cleanly end the tail process, too,
without tail attempting to write new data and failing _then_. On the
other platform, the pipe stays there until new data arrives to cause
tail to get the error trying to write to the pipe.

Regardless of what behaviour is sensible, it causes scripts that
take GNU tail's behaviour for granted to have different behaviour with
other versions of this very traditional UNIX tool.

So at the very least, this change should be documented as a possible
implementation difference in the manual, and for sure with the version
that changed behaviour, shouldn't it?


Regards,

Thomas Orgis

-- 
Dr. Thomas Orgis
Universität Hamburg
RRZ / Basis-Infrastruktur / HPC
Schlüterstr. 70
20146 Hamburg
Tel.: 040/42838 8826
Fax: 040/428 38 6270
[smime.p7s (application/pkcs7-signature, attachment)]

Reply sent to Pádraig Brady <P <at> draigBrady.com>:
You have taken responsibility. (Sat, 21 Apr 2018 00:57:01 GMT) Full text and rfc822 format available.

Notification sent to "Dr. Thomas Orgis" <thomas.orgis <at> uni-hamburg.de>:
bug acknowledged by developer. (Sat, 21 Apr 2018 00:57:02 GMT) Full text and rfc822 format available.

Message #10 received at 31225-done <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: "Dr. Thomas Orgis" <thomas.orgis <at> uni-hamburg.de>,
 31225-done <at> debbugs.gnu.org
Subject: Re: bug#31225: undocumented change in tail in 8.28 (pipe output
 monitoring)
Date: Fri, 20 Apr 2018 17:56:10 -0700
On 20/04/18 07:56, Dr. Thomas Orgis wrote:
> Hi all,
> 
> during debugging of a background process issue where I have tail -f
> feeding into a pipe, I was surprised by a change in tail introduced in
> release 8.28 of GNU coreutils: The monitoring of the output pipe and
> silent exit of tail e.g. in the case of
> 
> 	tail -f /dev/null | true
> 
> . This differs from earlier versions and also from BSD, for example. I
> see some subtle portability bugs here. One one platform, killing the
> end of a pipe fed by tail will cleanly end the tail process, too,
> without tail attempting to write new data and failing _then_. On the
> other platform, the pipe stays there until new data arrives to cause
> tail to get the error trying to write to the pipe.
> 
> Regardless of what behaviour is sensible, it causes scripts that
> take GNU tail's behaviour for granted to have different behaviour with
> other versions of this very traditional UNIX tool.
> 
> So at the very least, this change should be documented as a possible
> implementation difference in the manual, and for sure with the version
> that changed behaviour, shouldn't it?
> 
> 
> Regards,
> 
> Thomas Orgis
> 
Well we did document it in NEWS as seen in:
https://git.sv.gnu.org/cgit/coreutils.git/commit/?id=v8.27-42-gce0415f

I still regard tail being more responsive to closed output being an
improvement, and the more general solution, however it was a bit terse
and broached as only an improvement.

I pushed the following change to expand on the info:
https://git.sv.gnu.org/cgit/coreutils.git/commit/?id=22424dd

Marking this as done.

thanks,
Pádraig




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 19 May 2018 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 37 days ago.

Previous Next


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