Marcus Brinkmann <[EMAIL PROTECTED]> writes:

> The implementation is using the Hurd's IO interface.  It seems I was not
> clear enough in my original mail.  The translator creates a pipe to the
> forked program, and translates io_read into a pipe read and io_write
> into a pipe write.  The translator forks for every open().

Everything that uses the IO interface is either a file or a socket.  

> Now, suppose you have a program like wc that collects data and returns
> a summary of that data.  It will read from stdin until it gets EOF, and
> then print from stdout.  But if I use the above translator, I have only
> one filedescriptor, and I cannot simply close it if I want to read back
> the summary of wc.  

Then you are using a bidirectional pipe: you should really call it a
socketpair.  (Exactly how are you creating it?)

This is what the shutdown call is for.  You shutdown for writing,
which is like closing one half of the pipe.  The guy reading on the
other end will get EOF, but the other half of the pipe will be just
fine.

Thomas

_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd

Reply via email to