Kbase P52422: How to trap for a CTRL-C on UNIX or a CTRL-BREAK in Windows
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  17/02/2004 |
|
Status: Unverified
GOAL:
How to trap for a CTRL-C on UNIX or a CTRL-BREAK in Windows
FACT(s) (Environment):
Progress 9.1D
FIX:
The STOP condition is raised if CTRL-C or CTRL-BREAK is executed: Your can override the default handling by adding the ON STOP phrase to a REPEAT, FOR EACH, or DO statement.
Example Code Snippet:
DO ON STOP UNDO, LEAVE:
REPEAT ON ERROR UNDO, LEAVE
ON STOP UNDO, RETRY:
IF RETRY THEN DO:
MESSAGE "stop condition has occurred"
VIEW-AS ALERT-BOX INFO BUTTONS OK.
QUIT.
END.