home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!etchq.demon.co.uk
- From: MushyPea <MushyPea@etchq.demon.co.uk>
- Newsgroups: comp.sys.amiga.programmer
- Subject: File/Pipe/Console IO
- Followup-To: poster
- Date: Sun, 17 Mar 96 15:31:41 GMT
- Message-ID: <9603171531.AA002ox@etchq.demon.co.uk>
- Reply-To: MushyPea@etchq.demon.co.uk
- X-NNTP-Posting-Host: etchq.demon.co.uk
- X-Newsreader: ADMaN 1.7 Copyright 1995 S.T.Brown
- X-Mail2News-Path: relay-4.mail.demon.net!post.demon.co.uk!etchq.demon.co.uk
-
- Hiya, ppl,
-
- I am trying (and, so far, failing) to write a program that does something
- very simple...
-
- Imagine you have 2 input file handles, A and B.
- Imagine you also have 2 output file handles, C and D.
-
- I want to copy any incoming data from input A to output C.
- I also want to copy any data from input B to output D.
- Most importantly, I want to run both in parallel.
-
-
- How do I go about this? I've tried using Read()/Write(), but the program
- appears to pause at the Read() if there is no input from one of the inputs,
- which means that the other input is left waiting, even if it has data.
-
- Can anyone suggest any way of writing a program to transfer data between two
- pairs of filehandles simultaneously? Assembler code would be preferred,
- although C/C++ is just as useful.
-
- Thanks in advance.
-
- --
- MushyPea/EtCetera (Ian Marsh) [680x0 coder, musician] ___MMM___
- Email: MushyPea@etchq.demon.co.uk (EtCetera HQ) (O O)
- -WWW-: http://www.cus.umist.ac.uk/~mushypea/ ---oOO--(_)--OOo---
- A1200-030 10Mb SCSI2 700MbHD 3xCD 28800Vfc PGPv2.6ui
-
-