Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!ico!auto-trol!robwah From: robwah@auto-trol.UUCP (Robert Wahl) Newsgroups: comp.sys.ibm.pc Subject: Re: How can I disable Control-C ? Message-ID: <186@auto-trol.UUCP> Date: 15 Jun 89 18:20:08 GMT References: <216100099@trsvax> <1553@cod.NOSC.MIL> <1241@ethz.UUCP> Reply-To: robwah@auto-trol.UUCP (Robert Wahl) Organization: Auto-trol Technology, Denver Lines: 20 In article <1241@ethz.UUCP> zu@bernina.UUCP (Urs Zurbuchen) writes: >If you write a little program which intercepts to Ctrl-Break (Ctrl-C) >handler as a device driver and have it included in the Config.Sys file, >no user would be able to stop the machine with a ^C. Well, at least I >think, I didn't test it. Anybody volunteering to write it ? :-) Not so. The interrupts dealing with keyboard input will still respond to Ctrl-C. The only way to get sure control over Ctrl-C is to replace all of these interrupts. (And even then, as someone pointed out, some programs will still replace YOUR interrupts. Hypothetically, interrupts should cascade, so that user-defined interrupts would call the interrupts they replace; but such clean encapsulation doesn't always exist, and most programs never consider the existence/desirability of TSR programs.) A good discussion of Ctrl-C handling is given in "Crafting C Tools" (I think that's the name), where the authors begin by replacing some of the standard interrupts to correct some of IBM's serious design errors. (Insert favorite IBM flame here.) =:-> -- Rob Wahl =:-> {...!ncar!ico!auto-trol!robwah}