coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enhancement request for tee - please add the option to not quit on S


From: Bernhard Voelker
Subject: Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened
Date: Fri, 20 Nov 2015 18:38:28 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 11/20/2015 01:08 PM, Pádraig Brady wrote:
> +  tee no longer diagnoses write errors to a closed standard output, as this
> +  can be useful when further piping the output from process substitutions.

I'm not sure this is allowed by POSIX, but at least this regresses for other
reasons of EBADF like when the file descriptor is valid but not opened for
writing:


  $ echo | /usr/bin/tee >&0 ; echo $?
  /usr/bin/tee: standard output: Bad file descriptor
  /usr/bin/tee: write error
  1

  $ echo | src/tee >&0 ; echo $?
  0

As process substitutions give not that exact control over what happens anyway,
I'm 20:80 for adding because the proposed EBADF handling is blurring the
situation for all other cases which are relying on exact error diagnostic
and exit code.

Have a nice day,
Berny




reply via email to

[Prev in Thread] Current Thread [Next in Thread]