Thanks for backing me up @cumulonimbus .
So yeah, you can transfer file descriptors between processes. Each process have
his file descriptor table but the resource behind it can be shared to another
process through an ipc socket.
Here's how you would pass a payload along with one or more file descriptors
through an ipc socket in python:
sock.sendmsg([payload], [(socket.SOL_SOCKET, socket.SCM_RIGHTS,
array.array("i", [file_descriptor]))])
Run
...receiving it on the other side can be done with recvmsg:
[https://docs.python.org/3/library/socket.html#socket.socket.recvmsg](https://docs.python.org/3/library/socket.html#socket.socket.recvmsg)
I'm still a nim newbie and I wouldn't even know where to start in order to
implement recvmsg in async mode, that said I'm surprised no one encountered
this issue before as it's a common practice when doing low level networking
systems.
Maybe @dom96 have some experience with this ?