Newsgroups: comp.unix.questions
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!barmar
From: barmar@think.com (Barry Margolin)
Subject: Re: Named Pipes across NFS?
Message-ID: <1991Apr24.233121.3704@Think.COM>
Sender: news@Think.COM
Organization: Thinking Machines Corporation, Cambridge MA, USA
References: <4021@bruce.cs.monash.OZ.AU>
Distribution: comp
Date: Wed, 24 Apr 91 23:31:21 GMT

In article <4021@bruce.cs.monash.OZ.AU> oyang@bruce.cs.monash.OZ.AU (Kai Shing O'Yang) writes:
>Is it possible to have named pipes across NFS? What I want to have is
>a server that writes to the pipe while other client machines try to read
>from it. My application doesn't require the output to be serialised.
>I tried it on SunOS 3.5 and Ultrix 3.1 and it didn't work.

No.  The NFS protocol has no provision for such use.  NFS only supports
reading and writing directories and ordinary files.  In the case of other
file types, the client machine interprets type-specific attributes (e.g.
major and minor device numbers for device special files) locally.  In the
case of named pipes, the directory entry is just a name for a pipe, and
pipes are implemented entirely within the local kernel (didn't Jonathan
Kamens just answer this question a day or two ago?).

Why does it need to be a named pipe?  If the server and clients can be on
different machines, why not just use a regular file?  Named pipes are
simply optimizations that exist for processes on the same host.


--
Barry Margolin, Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar
