mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
join: promptly diagnose write errors
* src/join.c (prjoin): Check for write errors after each line. * tests/misc/write-errors.sh: enable the test for join. * NEWS: Mention the improvement.
This commit is contained in:
1 parent
b1df1d557e
commit
02a4ebd6c4
3 files changed
+5
-2
No files matched your search
@@ -62,7 +62,7 @@ GNU coreutils NEWS -*- outline -*-
|
||||
irrespective of which kernel version coreutils is built against,
|
||||
reinstating that behaviour from coreutils-9.0.
|
||||
|
||||
comm, cut, od, and uniq will now exit immediately upon receiving a
|
||||
comm, cut, join, od, and uniq will now exit immediately upon receiving a
|
||||
write error, which is significant when reading large / unbounded inputs.
|
||||
|
||||
split now uses more tuned access patterns for its potentially large input.
|
||||
|
||||
@@ -650,6 +650,9 @@ prjoin (struct line const *line1, struct line const *line2)
|
||||
|
||||
putchar (eolchar);
|
||||
}
|
||||
|
||||
if (ferror (stdout))
|
||||
write_error ();
|
||||
}
|
||||
|
||||
/* Print the join of the files in FP1 and FP2. */
|
||||
|
||||
@@ -36,7 +36,7 @@ factor --version; yes 1 | factor
|
||||
# TODO: fmt /dev/zero
|
||||
# TODO: fold -b /dev/zero
|
||||
head -z -n-1 /dev/zero
|
||||
# TODO: join -a 1 -z /dev/zero /dev/null
|
||||
join -a 1 -z /dev/zero /dev/null
|
||||
# TODO: nl --version; yes | nl
|
||||
# TODO: numfmt --version; yes 1 | numfmt
|
||||
od -v /dev/zero
|
||||
|
||||
Reference in new issue
Block a user