From owner-mint@fishpool.com Tue Jun 3 20:43:27 2003 Date: Tue, 3 Jun 2003 20:35:25 +0200 From: Ingo Schmidt X-Mailer: The Bat! (v1.62q) Personal Reply-To: Ingo Schmidt Organization: onlinehome.de X-Priority: 3 (Normal) Message-ID: <955905000.20030603203525@der-ingo.de> To: MiNT-Liste Subject: [MiNT] Pipes MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Delivered-To: mint@fishpool.com Delivered-To: mint@lists.fishpool.fi X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: ich@der-ingo.de Precedence: bulk List-help: List-unsubscribe: List-ID: X-List-ID: Hi everyone! I have a few questions about pipes and such. I am writing two programs that need to communicate with each other in that way: prg1 creates a pipe, starts prg2 and waits, until prg2 writes something into that pipe, then prg2 waits until prg1 writes something and so on. My approach was this: prg1 uses fpipe and passes the file handles to prg2 (cia command line). But obviously the file handles are not systemwide, so when prg2 tries to use the passed filehandles, it gets an EIHNDL from Fwrite. So the next thing I tried was this: prg1 does this: Fcreate in U:\pipe Fopen (read & write mode) Pexec(prg2) Fread So at that point prg1 goes to sleep, since there is nothing to read from the pipe, of course. That is intended. Now prg2 opens that pipe I created, again in read&write mode. Ideally, it would write to the pipe, thus waking up prg1, and then make an Fread itself (and therefore going to sleep, until prg1 writes to the pipe again and so on). However, when prg2 tries to write to that pipe, it gets and EACCDN error code. Why is that? Is the pipe I created earlier on only unidirectional? If yes, how do I get a bidirectional pipe? Or are there any other solutions for the type of communication I want? Cheers, Ingo =;->