Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!munnari.oz.au!metro!cs.uow.edu.au!u8705377 From: u8705377@cs.uow.edu.au (Paul Anthony Wilkinson) Newsgroups: comp.sys.amiga.programmer Subject: Re: WaitIO which waits also on CTRL-C wanted Message-ID: <1991Apr9.133921.11938@cs.uow.edu.au> Date: 9 Apr 91 13:39:21 GMT References: <1991Apr9.115224.2842@forwiss.uni-passau.de> Organization: Dept of Computer Science, Wollongong University Lines: 32 hessmann@r2d2.fmi.uni-passau.de (Georg Hessmann) writes: >Hi, >Has someone written a WaitIO function, which waits on the >IO *and* on CTRL-C ? >Maybe a function, which abort the IO and results an >error-code if a CTRL-C appeares. > Thanks, > Georg. Hi. The following code will achieve what you want: eg: SerialIO->IOSer.io_Command = CMD_READ; SerialIO->IOSer .... etc SendIO(SerialIO); /* Start IO but do not wait */ Wait( SIGBREAKF_CTRL_C | 1L << SerialMP->mp_SigBit); SerialMP is a pointer to the message port associated with your IOExtSer or whatever. This waits on the signal bit of the message port (which is set when the device "Replys" to your IO request) OR the CTRL-C Signal. Regards, Paul Wilkinson u8705377@wraith.cs.uow.edu.au #include