coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] tee: exit early if no more writable outputs


From: Bernhard Voelker
Subject: Re: [PATCH 1/2] tee: exit early if no more writable outputs
Date: Tue, 17 Feb 2015 08:36:54 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 02/17/2015 03:44 AM, Pádraig Brady wrote:
> +  yes | returns_ 1 timeout 10 tee /dev/full 2>err >/dev/full || fail=1

This test case combines 2 test cases, i.e., when writing to the output
file *and* to stdout is returning an error:

  $ yes |  timeout 10 src/tee /dev/full > /dev/full ; echo $?
  src/tee: standard output: No space left on device
  src/tee: /dev/full: No space left on device
  1

But if run separately, then we run into timeouts again:

  $ yes |  timeout 10 src/tee /dev/null > /dev/full; echo $?
  src/tee: standard output: No space left on device
  124

  $ yes |  timeout 10 src/tee /dev/full > /dev/null; echo $?
  src/tee: /dev/full: No space left on device
  124

Isn't exiting early in both cases what you wanted to achieve?

Have a nice day,
Berny



reply via email to

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