GNU bug report logs - #33761
Allow split to write into FIFOs

Previous Next

Package: coreutils;

Reported by: scottworley <at> scottworley.com

Date: Sat, 15 Dec 2018 15:33:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: scottworley <at> scottworley.com
Subject: bug#33761: closed (Re: bug#33761: Allow split to write into FIFOs)
Date: Sat, 15 Dec 2018 20:21:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#33761: Allow split to write into FIFOs

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 33761 <at> debbugs.gnu.org.

-- 
33761: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33761
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: scottworley <at> scottworley.com, 33761-done <at> debbugs.gnu.org
Subject: Re: bug#33761: Allow split to write into FIFOs
Date: Sat, 15 Dec 2018 12:20:00 -0800
[Message part 3 (text/plain, inline)]
Thanks for reporting that. I see similar problems in a couple of other coreutils 
programs. The style elsewhere seems to be to try ftruncate first, and report an 
error if it fails only if the file is not one for which POSIX specifies the 
behavior, so I think it'd be better if 'split' did that too. So I installed the 
attached patch to fix the problems that I found, and this should fix the bug you 
reported so I'll close the bug report.

Thanks also for the test case. To install that I'll need a copyright assignment 
form signed; can you do that for us? If so, please let me know and I'll get the 
paperwork ball rolling for you.
[0001-shred-sort-split-fix-ftruncate-error-reporting.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: scottworley <at> scottworley.com
To: bug-coreutils <at> gnu.org
Subject: Allow split to write into FIFOs
Date: Sat, 15 Dec 2018 00:00:18 -0800
[Message part 6 (text/plain, inline)]
TL;DR: Attached: Patch to allow split to write into FIFOs.



Currently, split fails when its output files are FIFOs because
FIFOs cannot be ftruncate()d.  Split exits with this error message:

  split: xaa: error truncating: Invalid argument

The attached patch causes split to only attempt the ftruncate when its
output is a regular file.
[coreutils-split-into-fifos.patch (text/x-diff, attachment)]

This bug report was last modified 6 years and 241 days ago.

Previous Next


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