Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!execu!sequoia!rpp386!jfh From: jfh@rpp386.cactus.org (John F Haugh II) Newsgroups: comp.unix.internals Subject: Re: Serial I/O Message-ID: <18801@rpp386.cactus.org> Date: 11 Dec 90 00:46:32 GMT References: <1990Nov26.092137.5629@oilean.uucp> <1629@svin02.info.win.tue.nl> Reply-To: jfh@rpp386.cactus.org (John F Haugh II) Organization: Lone Star Cafe and BBS Service Lines: 19 X-Clever-Slogan: Recycle or Die. In article <1629@svin02.info.win.tue.nl> debra@svin02.info.win.tue.nl (Paul de Bra) writes: >In article <1990Nov26.092137.5629@oilean.uucp> joe@oilean.uucp (Joe McGuckin) writes: >>I have an application that needs to send/receive stuff from a serial port in >>an async. manner. I know that Unix's tip forks a seperate processes for sending >>and receiving chars... > >Look at the source for kermit (public domain). >As far as i know it does everything with only one process. Ah, but Kermit cheats. It sends packets and then receives packets - it is very much a synchonous protocol. For async transfers you need something more clever. The "real" answer is the use select(), poll() or some combination of vmin=0/vtime=0 termio magic. Issue a select() call for all of your fd's and let the system figure it out ... -- John F. Haugh II UUCP: ...!cs.utexas.edu!rpp386!jfh Ma Bell: (512) 832-8832 Domain: jfh@rpp386.cactus.org