Domanda

The answer to this question shows how to share a file descriptor between two processes. I am unclear on whether this is possible with any process or only related processes. For example, is it possible to open an unnamed pipe and pass the read or write file descriptor to another unrelated process on a unix system?

È stato utile?

Soluzione

Yes, you can pass a file descriptor to any other process. The only requirement is that you open a Unix domain socket to communicate between the two processes.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top