I need to make a named pipe with mkfifo. For instance:
mkfifo mypipe
I'm going to have a systemd service (a simple shell script) that read from the pipe and I will write on the same pipe calling another script (e.g. write-to-pipe.sh
).
What if I have multiple instances of write-to-pipe.sh
writing simultaneously on the pipe?
I mean, many users can execute write-to-pipe.sh
. If two users try to write on the pipe at the same time, is it going to create trouble (like when two users try to write on a regular file (not pipe) and one overwrite the other) or not?
I hope this is not a duplicate, but I couldn't find an answer to this question…
Thanks
Best Answer
Here's a quick test I ran:
And the output I got from awk: