Xref: utzoo comp.sys.ibm.pc:10758 comp.lang.c:6607 Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!inuxc!iuvax!silver!creps From: creps@silver.bacs.indiana.edu (Steve Creps) Newsgroups: comp.sys.ibm.pc,comp.lang.c Subject: MSC 4.0 interrupt handlers Message-ID: <657@silver.bacs.indiana.edu> Date: 23 Jan 88 22:03:55 GMT Reply-To: creps@silver.UUCP (Steve Creps) Followup-To: comp.sys.ibm.pc Distribution: na Organization: Indiana University Computer Science Department Lines: 29 I have a program I'm porting from Unix to MS-DOS which makes use of an interrupt handler to handle ^C's. Now that I have it running under MS-DOS, this handler does not work. It seems to just ignore the ^C's. If anyone could offer some advice I would appreciate it. The program is setting up the interrupt handler with the call signal(SIGINT, interrupt); interrupt is declared as an int function of no arguments: int interrupt(); in the file in which the call to signal occurs. The routine looks like this: int interrupt() { automatic = 0; /* clears a flag. by the way, declared extern int */ signal(SIGINT, interrupt); } I also looked at the code in PC NetHack, and it does pretty much the same thing, and I noticed that unlike the Unix version of NetHack, PC NetHack doesn't ask you if you want to quit when you type ^C; it just prints "^C" and messes up the screen. Any help would be appreciated. - - - - - - - - - Steve Creps on the VAX 8650 running Ultrix 2.0-1 at Indiana University. creps@silver.bacs.indiana.edu, ...iuvax!silver!creps, creps@iubacs.bitnet "F-14 Tomcat! There IS no substitute."