[comp.unix.questions] named pipe across NFS

it1@Isis.MsState.Edu (Tim Tsai) (04/22/91)

  I'm having trouble reading a named pipe across NFS..  Consider this
  from station 1:

	mknod .plan p
	cat .cshrc > .plan &
	cat .plan

  This is equivalent to cat .cshrc..  Now this:

	cat .cshrc > .plan &

  and log on to station 2 (which shares the file system via NFS):

	cat .plan

  This process hangs.  Is there anything I can do to get around this
problem??  Is this the expected behavior??  Thanks..

  PS:  This is on Suns' (4/490, Sparcstation, IPC) running Sun OS
4.1.1.

--
  I'd never cry if I did find a blue whale in my soup...
  Nor would I mind a porcupine inside a chicken coop.
  Yes life is fine when things combine, like ham in beef chow mein...
  But Lord this time I think I mind, they've put acid in my rain. <Milo Bloom>

jik@athena.mit.edu (Jonathan I. Kamens) (04/22/91)

  You can't do what you're trying to do.

  NFS (well, at least, a good implementation of NFS :-) is smart
enough to let you create a named pipe and access it as a named pipe
for both read and write on the same machine.  However, it does not
allow you to write to the pipe on one machine and read from it on
another, or vice versa.

  In order to understand why this is so, you have to think about named
pipes as places where processes can "meet" to talk to each other.
Once two processes connect to each other on a named pipe, the
communication is handled in the kernel just the same as communication
would be handled on a pipe created with pipe(), with local buffers in
the kernel storing the data that is sent over the pipe.

  Why things were done this way touches upon the recent argument about
whether or not NFS should support transparent access to remote
devices.  I would argue that it should not, and that the behavior you
are observing is correct for what NFS was designed to do and what it
was not.

Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik@Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710

les@chinet.chi.il.us (Leslie Mikesell) (04/25/91)

In article <JIK.91Apr22024519@pit-manager.mit.edu> jik@athena.mit.edu (Jonathan I. Kamens) writes:

>  Why things were done this way touches upon the recent argument about
>whether or not NFS should support transparent access to remote
>devices.  I would argue that it should not, and that the behavior you
>are observing is correct for what NFS was designed to do and what it
>was not.

Not to suggest that NFS should be changed, but just that there are
choices and differences of opinions, RFS does support named pipes
spanning machines.  And yes, it is sometimes useful to be able to
communicate across machines with simple shell redirection and the
queuing mechanism built into FIFOS.

Les Mikesell
  les@chinet.chi.il.us