Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!ut-sally!im4u!rutgers!princeton!rocksvax!martyl From: martyl@rocksvax.UUCP (Marty Leisner) Newsgroups: comp.sys.ibm.pc Subject: Re: SIGINT question Message-ID: <28@rocksvax.UUCP> Date: Tue, 8-Sep-87 09:52:52 EDT Article-I.D.: rocksvax.28 Posted: Tue Sep 8 09:52:52 1987 Date-Received: Wed, 9-Sep-87 05:58:23 EDT References: <1930@isis.UUCP> Reply-To: martyl@rocksvax.UUCP (Marty Leisner) Organization: Xerox: Henrietta, NY Lines: 33 In article <1930@isis.UUCP> ross@isis.UUCP (Ross McConnell) writes: > > I am using signal() in a MSC4.0 program, to catch CTRL-C - everything >works fine. However, parts of the program consist of lengthy math >routines, and the response to the CTRL-C can be quite slow (5-10 >seconds). I believe that this occurs because DOS only checks for >CTRL-C while making BIOS calls. Is this true? If so, what is a good >way around it. Make "dummy" BIOS calls in the math routines? Any >suggestions would be appreciated. I believe it will only catch control C on disk io unless you have break on. I wrote a com port driver which I use for my console. If the character received is a cntl-C, I immediately issue a call to interrupt 1BH (the BIOS cntl-c handler). It appears to work a little better than when I run on the console with the standard supplied IBM stuff (it seems cntl-Cs are only checked as the DOS fetches characters from the type-ahead queue). If the program isn't catching CNTL-Cs, it has the funny side effect of just printing cntl-C on the screen -- at least I can tell the system is alive. A reasonable way to handle the problem may be to write a TSR to look for CNTL-Cs and if the program currently isn't in DOS, immediately do a far call to the CNTL-C handler defined in the programs PSP. I'm also looking for a way to abort a currently running program -- the above strategy should work for a special "hot key" which "aborts the current process". Any ideas on this? Anyone have this toy? (I'm tired of rebooting when debugging software). marty