Control-c Interrupts

At any time, Prolog's execution can be interrupted by typing ^c. Under Windows, interruption may be delayed if Prolog is in certain OS routines, especially when waiting for input; the interrupt will then happen when returning to the OS routine. The following prompt is then displayed:

     Prolog interruption (h for help)?
     

If you then type h, followed by <RET>, you will get a list of the possible responses to this prompt:

     Prolog interrupt options:
       h  help         - this list
       c  continue     - do nothing
       d  debug        - debugger will start leaping
       t  trace        - debugger will start creeping
       a  abort        - abort to the current break level
       q  really abort - abort to the top level
       e  exit         - exit from Prolog
     

The d option will cause you to enter the debugger the next time control passes to a spypoint. You can then use the g (ancestors) option of the debugger to find out at what level of execution you interrupted the program.

The t option will also cause you to enter the debugger at the next call.

The a option causes an abort to the current break level. In previous releases of Quintus Prolog, the a option ignored break levels, always aborting to the top level (break level 0).

The q option causes an abort to the top level (break level 0). This behavior is identical to the a option in previous Quintus Prolog systems.

In runtime systems, the default behavior on a ^c interrupt is to abort immediately, rather than display the above menu.

For more information on ^c interrupts and signal handlers, see ref-iex-iha.

The predicates that control this are:


halt/0
exit from Prolog
break/0
start a new break-level to interpret commands from the user
abort/0
abort execution of the program; return to current break level