[EMAIL PROTECTED] (Niels Möller) writes: > [EMAIL PROTECTED] (Thomas Bushnell, BSG) writes: > > > I'm baffled. If it's a plain pipe, then you simply close the end > > you're writing on, and the reader gets EOF. > > Well, I think there are systems where pipe gives you a bidirectional > pipe, but where shutdown on the pipe gives you the ENOTSOCK error. I > think I've read that pipes on the GNU system are always bidirectional, > and if so, does shutdown work on them?
Pipes are not bidirectional; pipes are unidirectional. They are made by making a bidirectional socket pair and then shutting down one direction from both sides. Shutdown of course works on them too, since they are really such socketpairs. But there's no *point* to shutdown on a pipe, because close is always just as good. > And I'm also curious about pty:s, I find it a rather annoying bug in > U*IX that there's appearantly no reliable way to make the process > reading the slave side of the pty get EOF. The standard (e.g. what > emacs does) way seems to be to write ^D to the master side, and just > hope that the tty is in canonical mode and that ^D really is the EOF > character. That's the way. (You can always force the tty into canonical mode, you know, and hope.) _______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd