Darren New wrote: > Christopher Smith wrote: >> Not at all. You just fork after you create the file. I've also seen some >> OS's that let you copy a file descriptor from another process, which is >> a pretty cool way to handle it. I don't think there is a way to do that >> with Linux. > > Actually, on that one, I think there is. You have to use some special > magic call to write the file descriptor to a pipe or some such, and the > other end gets the file opening. Not that I'd ever use such a thing, but > clearly someone needed it. I remember reading about it when someone > wanted to pass like an X11 window handle to a different process or > something.
Yes, that was the trick. I couldn't remember it, so I thought it was something I'd done on another POSIX OS. IIRC you can do it with a Unix domain socket or a pipe, but I forget exactly how the magic works. --Chris -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
