Re: bash - pipe
- From: Antonio Macchi <antonio_macchi@xxxxxxxx>
- Date: Fri, 26 Sep 2008 12:31:20 +0200
Trying to reproduce your example:
ldo@theon:~> echo 123 >/tmp/fifo & echo 456 >/tmp/fifo &
[1] 25800
[2] 25801
ldo@theon:~> read -n3 </tmp/fifo; echo $REPLY
123
bash: echo: write error: Broken pipe
ldo@theon:~>
[1]- Done echo 123 > /tmp/fifo
[2]+ Exit 1 echo 456 > /tmp/fifo
The second echo died as soon as the input end of the pipe was closed.
??
I have no errors... and $REPLY is 456
$ uname -r
2.6.24.3vnl
$ echo $BASH_VERSION
3.1.17(1)-release
-----------------
$ echo 123 > /tmp/fifo & echo 456 > /tmp/fifo &
[1] 11408
[2] 11409
$ read -n3 < /tmp/fifo ; echo $REPLY
456
[1]- Done echo 123 >/tmp/fifo
[2]+ Done echo 456 >/tmp/fifo
-----------------
what happens?
.
- Follow-Ups:
- Re: bash - pipe
- From: Lawrence D'Oliveiro
- Re: bash - pipe
- References:
- bash - pipe
- From: Antonio Macchi
- Re: bash - pipe
- From: Lawrence D'Oliveiro
- bash - pipe
- Prev by Date: Re: bash - pipe
- Next by Date: Re: bash - pipe
- Previous by thread: Re: bash - pipe
- Next by thread: Re: bash - pipe
- Index(es):
Relevant Pages
|