If i do.
mkfifo /tmp/a echo 'one'>/tmp/a
in the while from another terminal
and from a third terminal
Why i obtain as output of the last command this?
The shell does an
And so will the
So at the moment you do
To avoid blocking, you could do:
to unlock the pipe first, and then run your commands which won't block until the pipe is full.
Note however that the above will work on Linux but not on every Unix or Unix-like. The behaviour when opening a pipe in read-write mode is unspecified by POSIX.