echo something to a named pipe made with
mkfifo, it hangs if no process is reading from that pipe. How can I prevent that, i.e., stop that from hanging?
And by the way, why is that hanging
echo process not listed in
ps -e or
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
It's not totally clear what your desired end result is from the question, so I will assume that your desire is to continue the program, but still have the write occur when possible. In that case, just background the operation:
echo foo > fifo &
As for why
echo is not listed in the process table, it's because
echo is a shell builtin.