summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2023-02-27 18:07:06 +0000
committerPádraig Brady <P@draigBrady.com>2023-02-28 14:02:42 +0000
commitfb757fd7d9b82284be50c10e0e6ce2d6e66b70af (patch)
tree9f6ac0cbf71e407dd237f4426e4a2a29d6e4f3e3
parentb1376bb829be9147b5699fff637529378b02f758 (diff)
downloadcoreutils-fb757fd7d9b82284be50c10e0e6ce2d6e66b70af.tar.gz
doc: tee -p: clarify operation
* src/tee.c (usage): Change from describing one (non pipe) aspect to the more general point of being the option to use if working with pipes, and referencing the more detailed info below. * doc/coreutils.texi (tee invocation): s/standard/appropriate/ since the standard operation with pipes is to exit immediately upon write error. s/early/immediately/ as it's ambiguous as to what "early" is in relation to.
-rw-r--r--doc/coreutils.texi6
-rw-r--r--src/tee.c3
2 files changed, 5 insertions, 4 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 18f01d4c7..7ea910ba8 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -14179,7 +14179,7 @@ Ignore interrupt signals.
@opindex --output-error
Adjust the behavior with errors on the outputs.
In summary @option{-p} allows @command{tee} to operate in a more
-standard manner with pipes, and to continue to process data
+appropriate manner with pipes, and to continue to process data
to any remaining outputs, if any pipe outputs exit early.
The default operation when @option{--output-error} is @emph{not}
specified is to exit immediately on error writing to a pipe,
@@ -14198,7 +14198,7 @@ This is the default @var{mode} when not specified,
or when the short form @option{-p} is used.
Warn on error opening or writing any output, except pipes.
Writing is continued to still open files/pipes.
-Exit early if all remaining outputs become broken pipes.
+Exit immediately if all remaining outputs become broken pipes.
Exit status indicates failure if any non pipe output had an error.
@item exit
@@ -14206,7 +14206,7 @@ Exit on error opening or writing any output, including pipes.
@item exit-nopipe
Exit on error opening or writing any output, except pipes.
-Exit early if all remaining outputs become broken pipes.
+Exit immediately if all remaining outputs become broken pipes.
@end table
@end table
diff --git a/src/tee.c b/src/tee.c
index c69ea9133..e328e6f04 100644
--- a/src/tee.c
+++ b/src/tee.c
@@ -96,7 +96,7 @@ Copy standard input to each FILE, and also to standard output.\n\
-i, --ignore-interrupts ignore interrupt signals\n\
"), stdout);
fputs (_("\
- -p diagnose errors writing to non pipes\n\
+ -p operate in a more appropriate MODE with pipes.\n\
--output-error[=MODE] set behavior on write error. See MODE below\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
@@ -109,6 +109,7 @@ MODE determines behavior with write errors on the outputs:\n\
exit exit on error writing to any output\n\
exit-nopipe exit on error writing to any output not a pipe\n\
The default MODE for the -p option is 'warn-nopipe'.\n\
+With \"nopipe\" MODEs, exit immediately if all outputs become broken pipes.\n\
The default operation when --output-error is not specified, is to\n\
exit immediately on error writing to a pipe, and diagnose errors\n\
writing to non pipe outputs.\n\