is there a way to pass an open fd to another process?
> is there a way to pass an open fd to another process?
--
Oisin McGuinness
SMBC Capital Markets
277 Park Avenue
New York NY 10172
USA
> ?
> ? is there a way to pass an open fd to another process?
> Read Chapter 15 in the late great W. Richard Stevens' book, "Advanced
> Programming in the Unix Environment",
> published by Addison Wesley, 1992, ISBN 0-201-56317-7. (Everyone should
> own this book.)
> He describes the ins and outs of this, with lots of source code.
> --
> Oisin McGuinness
--
Oisin McGuinness
SMBC Capital Markets
277 Park Avenue
New York NY 10172
USA
1. Passing open file descriptors
Use /proc/*/fd/* - you can pass the pid and filedescriptor number as
text, and have the other process simply open the descriptor. This
assumes that both processes are running as the same user.
This appears to work for network sockets and named pipes as well as
for files, under 1.1.69.
I wouldn't wait for the streams stuff, it could be a while coming.
PS: You're posting to the wrong newsgroup - followups redirected to
col.help.
--
+44 1223 575512 Escoerea on IRC. http://www.cl.cam.ac.uk/users/iwj10/
2. . sed script dc greg ubben sed stud
3. autoinstall patches and passing file descriptors via sockets
4. Session leader, controlling terminal, process group leader
5. UNIX domain sockets - file descriptor passing
7. glibc and passing live file descriptors through sockets
9. Passing file descriptors thru rexec() socket
10. 4.2 inetd passes its last open descriptor to child processes
11. Passing open descriptors between processes
12. Help : Passing Socket Descriptor
13. Help: Passing Socket Descriptor