Date: Fri, 23 Mar 2001 13:26:33 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "Mark E." Message-Id: <9743-Fri23Mar2001132632+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 CC: djgpp-workers AT delorie DOT com In-reply-to: <3ABA9AB6.9970.50AA59@localhost> (snowball3@bigfoot.com) Subject: Re: pipe() emulation References: <3ABA9AB6 DOT 9970 DOT 50AA59 AT localhost> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "Mark E." > Date: Fri, 23 Mar 2001 00:37:10 -0500 > > After looking over the POSIX docs for pipe, I took out the code that moved up > the handles since it goes against at least two sentences in the draft > standard. Which ones? > To make the emulation more complete, I could > even add code to prevent lseek from working with files opened with pipe since > POSIX explicitly forbids that. I think this is a good idea. In general, if better Posix compliance is possible without too much effort, I think we should have it. > ! This function creates a pipe and places a file descriptor for the read end > ! of the pipe in @var{fildes[0]}, and another for the write end in > ! @var{fildes[1]}. Data written to @var{fildes[1]} will be read from > ! @var{fildes[0]} in a first-in first-out (FIFO) basis. > > + Note that DOS doesn't support pipes so they are emulated with temporary > + files. This function should only be used in porting Unix and POSIX programs > + that use it. I think this should say that fork/exec and any other way to get async subprocesses will not work with this pipe implementation. Also, an example, perhaps from real Bash code, would be nice.