[Gambas-user] Pipe doesn't receive contents
Rolf Schmidt
rolf.frogs at ...221...
Fri May 7 16:32:15 CEST 2010
Hi Doriano
> > You can't wait until EOF on a named pipe! Also a 'tail' on a named pipe
> > will never give you some data - but 'cat' do!
> >
> > Just read and find another mechanism to stop reading.
>
> I tried cat and tail on named fifo, and both work. You can start first
> either of the two sides, and they work.
> I did it with:
>
> mkfifo /tmp/fifo
> ls >/tmp/fifo
ls sends a termiated data stream!
>
> then, in another terminal:
>
> tail -3 /tmp/fifo
Of course you can read it, because ls stops when the content is in the pipe.
> I also tried to start first the tail command, and then the cat >...
>
See a server which sends data via named pipe, then you will recognice,
that 'cat' can show the data while 'tail' waits for an end of file, which
will only come when the server stops!
Hope it becomes more clear.
Rolf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20100507/2622a59a/attachment.sig>
More information about the User
mailing list