Subject: bug#22195: deviation from POSIX in tee

From: Paul Eggert <[email-masked]>
Date: Thu, 17 Dec 2015 19:22:01 -0800

Eric Renouf wrote:
> If a write to any successfully opened file operand fails

But the write didn't fail here. Instead, a signal was sent to 'tee'. If you 
don't want the signal, trap it. E.g.:

trap '' PIPE
for i in {1..300}; do
     echo "$i"
     echo "$i" >&2
     sleep 1
done | tee >(head -1 > h.txt; echo "Head done") \
  >(tail -1 > t.txt) >/dev/null

will give the behavior you want.

So there is no deviation from POSIX here.