Re: Passing file descriptor to another process



K-mart Cashier <cdalten@xxxxxxxxx> writes:


How does one pass file descriptors AFTER the process has started? And
why would want to do this?

Using system V streams, or unix domain sockets. Passing open network
connections is a common usage.

scott
.



Relevant Pages

  • Re: _cleanup() vs Linux fcloseall()
    ... I'd prefer to see a function that closed all file descriptors greater ... than a specified limit (which makes it easy for a process to preserve ... stdin/out/err but close everything else). ... indirectly by saying that fflushis used prior to closing the streams. ...
    (freebsd-current)
  • Re: how truncate a file in C?
    ... > FC> fflush() guarantees nothing here. ... > fflushshall cause any unwritten data for that stream to be written ... for defined interaction between stdio streams and file descriptors, ...
    (comp.unix.programmer)
  • Re: _cleanup() vs Linux fcloseall()
    ... I'd prefer to see a function that closed all file descriptors greater ... stdin/out/err but close everything else). ... indirectly by saying that fflushis used prior to closing the streams. ... According to fcntlmanpage from the netbsd, ...
    (freebsd-current)
  • Re: File Descriptors With High Values
    ... Jeff wrote: ... > file descriptors, then yes, every socket gets closed. ... Usually file descriptors start at the bottom ... However, if you're talking about FILE * streams, then on many systems, ...
    (comp.unix.programmer)
  • Re: [PATCH -mm 5/7] add user namespace
    ... So you can't assumes uids are the same. ... file descriptors or files passed through unix domain sockets. ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)