allow_break

Definition: allow_break(bool bAllow)
Description: Determine whether control-c/control-break should terminate the program. -- If bAllow is TRUE then allow that, else/FALSE, don't. -- Initially those keystrokes *will* terminate the program, but -- only when it actually tries to read input from a console. When i is 1 (true) control-c and control-Break can terminate your program when it tries to read input from the keyboard. When i is 0 (false) your program will not be terminated by control-c or control-Break.
Comments: DOS will display ^C on the screen, even when your program cannot be terminated.

Initially your program can be terminated at any point where it tries to read from the keyboard. It could also be terminated by other input/output operations depending on options the user has set in his config.sys file. (Consult an MS-DOS manual for the BREAK command.) For some types of program this sudden termination could leave things in a messy state and might result in loss of data. allow_break(0) lets you avoid this situation.

You can find out if the user has pressed control-c or control-Break by calling check_break().
Example:
allow_break(0)  -- don't let the user kill me!
See Also: check_break