mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
groups: promptly diagnose write errors
* NEWS: Mention the improvement. * src/groups.c (main): Call fflush for each listed user to check for write errors. * tests/misc/io-errors.sh: Add an invocation of 'groups'.
This commit is contained in:
1 parent
224588ce47
commit
80b229be71
3 files changed
+7
No files matched your search
@@ -18,6 +18,9 @@ GNU coreutils NEWS -*- outline -*-
|
||||
|
||||
** Improvements
|
||||
|
||||
'groups' will now exit immediately upon receiving a write error, which is
|
||||
significant when listing information for many users.
|
||||
|
||||
'nl' now supports multi-byte --section-delimiter characters.
|
||||
|
||||
'shuf -i' now operates up to two times faster on systems with unlocked stdio
|
||||
|
||||
@@ -134,6 +134,9 @@ main (int argc, char **argv)
|
||||
if (!print_group_list (argv[optind], ruid, rgid, egid, true, ' '))
|
||||
ok = false;
|
||||
putchar ('\n');
|
||||
|
||||
if (fflush (stdout) < 0)
|
||||
write_error ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ fmt foo
|
||||
fold foo
|
||||
fold -b foo
|
||||
fold -c foo
|
||||
groups
|
||||
head -n1 foo
|
||||
join foo foo
|
||||
nl foo
|
||||
|
||||
Reference in new issue
Block a user