]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: tee -p: clarify operation
authorPádraig Brady <P@draigBrady.com>
Mon, 27 Feb 2023 18:07:06 +0000 (18:07 +0000)
committerPádraig Brady <P@draigBrady.com>
Tue, 28 Feb 2023 14:02:42 +0000 (14:02 +0000)
* 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.

doc/coreutils.texi
src/tee.c

index 18f01d4c75ce2562523cf687fcdcac1331d8e10b..7ea910ba82662d6407b43aef099af66530c943f0 100644 (file)
@@ -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
index c69ea913371550ee3c4fb3997e09ce1655d635ea..e328e6f04dd425ac012a938c522e346237dcf7ab 100644 (file)
--- 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\