coreutils
[Top][All Lists]
Advanced

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

Re: using tee with mkfifo


From: Andreas Schwab
Subject: Re: using tee with mkfifo
Date: Fri, 27 Apr 2012 22:46:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux)


Peng Yu <address@hidden> writes:

> Hi,
>
> The following code hangs there for ever. I don't understand what is
> going on. Basically, I tee stdin to two named pipes and cat both
> pipes. Could anybody let me know what I am wrong? Thanks!
>
> mkfifo a.suffix b.suffix
> echo Hello World | tee a.suffix > b.suffix &

Here the shell waits for a reader for b.suffix (tee hasn't even been
started yet).

> cat a.suffix b.suffix

Here cat is waiting for a writer for a.suffix (b.suffix hasn't even been
considered yet).

Andreas.

-- 
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

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