[EXTERNAL] Re: mkfifo: cannot set permissions of 'x.fifo': Not a directory
Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Wed Aug 23 17:39:02 GMT 2023
> What happens when the user executes two copies of an
> application /*such as PyCharm*/ on two separate machines sharing the same
> home directory? Does the directory entry and inode get reused on startup
> and/or deleted on exit? How does that impact the process instance on the
> other machine? The conclusion I came to long ago is that if pipes are to
> be implemented in a network file system namespace then the pipes must be
> fully functional network pipes.
A p-type i-node (FIFO on Unix) is a local named pipe regardless of its location. Two pairs of applications running on two different hosts that happen to mount the same network share, do not have to "know" of each other, the i-node is only used to identify the FIFO within the namespace of the same node. So both pairs can actually be communicating locally within their respective nodes, without affecting one another, between the processes within that same node. Deleting / creating a FIFO has no significance, as it's just an i-node to "name" the pipe (via the i-node number).
Unlike UNIX sockets (which too can be placed on network shares, BTW), FIFO files do not need to be re-created afresh every time they are used. The only requirement is that the same i-node is opened for both reading and writing, and that's all it is necessary to create a communication channel: "man 7 fifo".
Someone wanting a truly networking device should be using sockets.
More information about the Cygwin