Newsgroups: comp.os.minix Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: Pipes and other oddities... Message-ID: <1989Jan20.202425.10714@utzoo.uucp> Organization: U of Toronto Zoology References: <6815@louie.udel.EDU> Date: Fri, 20 Jan 89 20:24:25 GMT In article <6815@louie.udel.EDU> Rbaker@afmpc-1.arpa writes: >1. My instructor insists that under *nix and/or MINIX, a single pipe can >flow data in both directions between processes... ie., a pipe can be opened >for both read and write. Please, someone back me up on this - I swear a >pipe is a one-way flow - opened for read-only at one end and write-only >at the other. Please flame one of us, gently. [Turn on burner, low and gentle flame... :-)] The usual Unix pipe has one read-only descriptor and one write-only descriptor, but any number of processes can be using either and there is no reason why one process can't use both. Of course, if more than one process is writing, you get their data more or less intermixed unless they coordinate somehow, and if more than one process is reading, which gets what data is random unless they coordinate somehow. If he's thinking of a full-duplex connection, with an independent path in each direction, he's wrong except for some research systems using Dennis Ritchie's "streams" scheme for their pipes. -- Allegedly heard aboard Mir: "A | Henry Spencer at U of Toronto Zoology toast to comrade Van Allen!!" | uunet!attcan!utzoo!henry henry@zoo.toronto.edu