Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!munnari.oz.au!metro!seagoon.newcastle.edu.au!jupiter.newcastle.edu.au!mazz From: mazz@jupiter.newcastle.edu.au (Richard Mazzaferri) Newsgroups: comp.os.msdos.programmer Subject: Re: Disabling CTRL-C, in Turbo-C - not via TSR. Keywords: Eat CTRL-C, not CTRL-BREAK Message-ID: Date: 12 Apr 91 03:51:57 GMT Article-I.D.: jupiter.mazz.671428317 References: <1065@masterCNA.TEK.COM> Sender: news@neddy.newcastle.edu.au Distribution: comp Organization: Uni of Newcastle, Australia Lines: 35 waynet@kit.tek.com (Wayne Turner) writes: >In article mazz@jupiter.newcastle.edu.au (Richard Mazzaferri) writes: [ trying to prevent "^C" from reaching screen, while still allowing CTRL-BREAK to generate it's interrupt - I said INT0x24 when I should have 0x23. ] >You must mean INT 0x23 not 0x24 as 0x24 is for the critical error interrupt. >If you really are hooking 0x24 and not 0x23 you should make this change >first. Yes, sorry - I've also written my critical event handler for INT 0x24, and I'm starting to get memory glitches from all those interrupt handlers - forgetting which one does what. [ Suggestion 1 : Use IOCTL to put stdin into raw mode. ( I'd already tried this. ) Some other DOS/BIOS call apparently puts stdin back into cooked mode. ( I've never tried to track down how/why either. ) ] [ Suggestion 2 : install own handler for keyboard interrupt. Wayne had problems. ( I was hoping not to do this. ) Anyone ever done it? ] [ Suggestion 3 : redirect stderr/stdout to a tempfile using dup2. ( I thought of doing this and thought - No, there must be a better way. ) ] Thanks for the ideas and shared experience. If no-one comes up with a better idea I guess this will have to be implemented. Does anyone actually know how ANSI.SYS redefines keys? Mazz. -- ----------------------------------------------------------------- Richard Mazzaferri, Comp.Sc. Ph.D. student, Uni. of Newcastle, Ph (049) 602574 mazz@nucs.newcastle.edu.au Australia. -----------------------------------------------------------------