Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!elroy.jpl.nasa.gov!swrinde!mips!apple!mauxci!eci386!woods From: woods@eci386.uucp (Greg A. Woods) Newsgroups: comp.unix.internals Subject: Re: Regular pipe vs. Named Pipe Message-ID: <1991Jun13.184737.6343@eci386.uucp> Date: 13 Jun 91 18:47:37 GMT References: <14079@dog.ee.lbl.gov> <14192:Jun923:16:0791@kramden.acf.nyu.edu> <2736@root44.co.uk> <25101:Jun1217:29:0291@kramden.acf.nyu.edu> Reply-To: woods@eci386.UUCP (Greg A. Woods) Organization: Elegant Communications Inc. Lines: 43 brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: > In article <2736@root44.co.uk> gwc@root.co.uk (Geoff Clare) writes: > > brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: > > >Basically, pipes work the same way everywhere, and named pipes don't. > > >The name part of named pipes is their least portable aspect. Never use > > >them in a long-lived program if you can use any other communications > > >mechanism. > > > > Apart from the fact that Dan obviously didn't mean what he wrote here > > ("any other communications mechanism" would include a mechanism specific > > to one system, and therefore totally non-portable), > > I meant what I wrote. A program which supports message queues and > UNIX-domain sockets will work correctly on far more machines than a > program which supports named pipes. In fact, a program which does > anything with named pipes that couldn't be done with pipes is almost > certainly going to fail on one of (A) SunOS; (B) Ultrix; (C) SVR4. GRRR! You should really read some market data Dan. There are probably several million more "machines" out there running with Named Pipes and no Sockets than there are the other way 'round. As others have said, they were in UNIX (i.e. the trademarked one from AT&T) since a long time ago, and work more portably on any versions of UNIX derived from the "real" AT&T version than any other IPC mechanism available on the same machines. You can blame whoever you want for not keeping BSD UNIX in line with AT&T's versions. They seem to have split the tree quite early, and not only were they not interested in updating their license, but were not even interested in matching their functionality, if only for portability reasons.... On the other hand, AT&T have endeavored to include some of the more coherent features of BSD in current releases, even if they did go a bit over-board with r4! As for the future, "real" UNIX will have Named Pipes for quite some time, only they call them FIFO's now. In case you missed it, please see mkfifo(1m) and mkfifo(3c) in the SysVr4 documentation. According to read(2) from the same documentation, FIFO's have *exactly* the same semantics as pipes created by pipe(2), as I believe they "always" have. -- Greg A. Woods woods@{eci386,gate,robohack,ontmoh,tmsoft}.UUCP ECI and UniForum Canada +1-416-443-1734 [h] +1-416-595-5425 [w] VE3TCP Toronto, Ontario CANADA Political speech and writing are largely the defense of the indefensible-ORWELL