2009/12/7 Sam Watkins <s...@nipl.net>:
> I meant for example if a process is reading from its stdin a open file 'A' and
> writing to stdout the input of a pipe 'B', rather than looping and forwarding
> data it may simply "join" these two fds, and exit.  The OS will then do what 
> is
> necessary to make sure the data can travel from A to B (and/or vice versa) 
> with
> the minimum effort needed.

i'm not sure how you think this would work.

a file descriptor is essentially a passive object - it responds
to read, write, etc requests on it, but it doesn't do anything
of its own accord.

if i do:

fd1 := open("/foo1", ORDWR);
fd2 := open("/foo2", ORDWR);
fd3 := fdjoin(fd1, fd2);

what is going to happen?
something has got to initiate the requests to actually
shift the data, and it's not clear which direction the
data will flow.

this is an optimisation, right? what parts of the current system
could be speeded up by the use of this primitive?

Reply via email to