If a user aborts a program that calls-in to GT.M, GT.M
can drop the user to the 'GTM> ' prompt. This is most
likely to occur when the program makes numerous calls
in a row, such as in a for() loop.
GT.M installs itself as a signal handler for SIGINT
during gtm_init() even when invoked only through the
gtmshr call-in library. If the program had previously
registered itself as a signal handler, this association
will have been lost after gtm_init().
Workaround: reinstall your own signal handler after
calling gtm_init() (subsequent calls to GT.M through
gtm_ci() do not seem to make it re-register itself).
If the program/script uses the shell defaults for
signal handling, it is necessary to create a handler
for at least SIGINT if dropping to GTM is not desired.
Workaround: instruct user to type 'halt' at GTM> prompt
if it is encountered.
It would be nice if GT.M would not install itself this
way during gtm_init() or would detect that it was
invoked by call-in and automatically halt when CTRL+C
is detected, rather than drop to GTM> prompt.