

Passing Open Files Between Processes with Unix Sockets - Perceptes
http://jstorimer.com/2012/05/07/passing-open-files-over-unix-sockets.html

======
cnvogel
In case you are interested in the "low-level" implementation, there are C
example in the manpages (tested on Ubuntu Linux):

    
    
       man 3 cmsg
    

Look for SCM_RIGHTS;

