On Fri Nov 5 06:32:55 EDT 2010, [email protected] wrote: > One of the ugliest interface in Unix is passing a file descriptor between > processes [1]. Does Plan9 provide any mechanism for it? > > [1] > http://book.chinaunix.net/special/ebook/addisonWesley/APUE2/0201433079/ch17lev1sec4.html
there is no mechanism similar to sending fds over a socket. the two ways of file descriptor sharing are via (a) rfork(2); and (b) srv(3) rfork (optionally) allows a process to share a file descriptor table with a child process. srv allows a process to post a file descriptor by a given name in /srv. the normal file operations apply on that file. in particular, it must be opened before use. - erik
