Sets function to be called on receipt of abort key
| Call | |
| #include <vv_sys.h> | |
| void se_abortfp(abort_fp) | |
|
ISVRP abort_fp() |
Pointer to an abort function or NULLFP |
| Returns
None |
|
| Description
se_abortfp() installs an abort function that will be called when an abort key is detected, allowing the program to clean up before exiting. Specifying NULLFP as the parameter will remove the previously installed abort function; no abort processing will be done if NULLFP is installed as the abort function. The abort function should have no parameters, return no value, and call vv_exit() and then exit(). PCDOS Systems: The interrupt service routine (ISVR) for INT 23H (Ctrl-C Exit) is replaced with a stub routine. This prevents DOS functions from aborting the program. In addition, the function pointer is installed in a global that ki() and ki_chk() check on receipt of Ctrl-C. If such a break is detected, the function pointed to is invoked. If the abort function pointer is NULLFP, ki() and ki_chk() return 257. Ctrl-C will only be detected when the program is using ki() or ki_chk() to scan for input. To allow DOS functions to process Ctrl-Break, use se_breakfp(). OS/2 Systems: The abort function is called on receipt of an interrupt signal (SIGINT or SIGBREAK) via a call to signal(). The interrupt signal is generated by the Ctrl-C and Ctrl-Break keys. If the function is NULLFP, the interrupt signal is ignored. If the keyboard is in the binary mode, ki() and ki_chk() then return the value of 257 if Ctrl-Break is pressed and 3 if Ctrl-C is pressed. No value is returned by ki() or ki_chk() if one of those keys is pressed and the keyboard is in ASCII mode (the default). UNIX and POSIX Systems The abort function is called on receipt of an interrupt signal (SIGINT) via a call to signal(). The interrupt signal is generated by a user-defined key, which the user sets in the shell environment. If the function is NULLFP, the interrupt signal is ignored. No value is returned by ki() or ki_chk() when the interrupt key is pressed. VMS Systems: The function pointer is installed in a global variable that ki() and ki_chk() check on receipt of a Ctrl-C or Ctrl-Y. If such a break is detected, the function pointed to is invoked. If the abort function pointer is NULLFP, ki() and ki_chk() return 257. |
|