Re: [BUG] Passing FDs over pipes

Richard Gooch (Richard.Gooch@atnf.CSIRO.AU)
Thu, 14 May 1998 22:29:01 +1000


Miquel van Smoorenburg writes:
> In article <199805140750.RAA11005@vindaloo.atnf.CSIRO.AU>,
> Richard Gooch <Richard.Gooch@atnf.CSIRO.AU> wrote:
> >David S. Miller writes:
> >> Use UNIX sockets then, just like everybody else who needs to pass FD's
> >> around over a connection endpoint between two UNIX processes. Whats
> >> so wrong with that?
> >
> >Because what I am doing is forking and execing a process which is used
> >as a data filter. The stdout of the data filter is read by the
> >launching programme. The data filter wants to pass a FD "back" to the
> >launcher. Creating a Unix socket would be quite messy in this context.
>
> socketpair()

Bugger. I forgot about that one. I'm used to using explicit socket(),
bind() and connect() calls. Yep, that seems to do the job. Thanks.

Regards,

Richard....

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu