Search code examples
c++linuxsocketsconnectioninterprocess

Linux, C++, will dup(socket) work from another not forked process (if not how to enable it)?


So I opened a socket connection like was described here I want to let other processes use that open connection. Will dup() help me or what shall I do?


Solution

  • In order to pass sockets between existing processes you need to use sendmsg - Or libancillary which abstracts the whole thing.