I need to pass a socket descriptor to another process on Linux using Mono. On Windows this is easily accomplished using Socket.DuplicateAndClose(int). I have found this post describing the process in c:
Can I share a file descriptor to another process on linux or are they local to the process?
In my program I have been able to create Unix sockets between two Mono programs using Mono.Unix and Mono.Unix.Native namespaces. I have been able to find some details that are roughly similar here:
http://svn.aircrack-ng.org/trunk/lib/csharp/MonoExample/NDesk-dbus/
I am still getting an EINVAL error when I try to send a socket descriptor. Does someone have a sample of this working?