runtime_entry/1 hook


:- multifile runtime_entry/1.


This predicate is called upon start-up and exit of stand alone applications.


Event one of [start,abort]


In a default runtime system, the program starts by executing the goal,


When that goal terminates, either by succeeding or by failing, the runtime system terminates.

Similarly, it is possible to specify what is to be done on an abort. An abort happens when a call is made either to the built-in predicate abort/0 or to the C routine QP_action(QP_ABORT). (By default, a call of QP_action(QP_ABORT) happens when a user types ^c -- see sap-rge-iha). At this point, the current computation is abandoned and the program is restarted with the goal


Effectively this replaces the original call to runtime_entry(start), so that when this call succeeds or fails, the runtime system terminates.

Users of the module system should ensure that the predicate runtime_entry/1 is defined in the module user, that is, not inside any user-defined module.

See Also

QP_toplevel() fli-emb-how-mai