bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: run.c translator


From: Thomas Bushnell, BSG
Subject: Re: run.c translator
Date: 20 Mar 2002 10:44:32 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

nisse@lysator.liu.se (Niels Möller) writes:

> tb@becket.net (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.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]