Subject: Re: ctrl-c

From: Jan Wielemaker <[email-masked]>
Date: Tue, 6 Jun 2000 21:26:22 +0200

> thanks a lot for your help for the on_signal stuff...
> 
> but, I still have a problem : on_signal works ok when I load the .pl file
> under the prolog interface (when I press ctrl-c, it halts just as I
> wanted), but when I compile my file with the command line:
> pl --goal=main --stand_alone=true -o mystuff -c mystuff.pl
> and execute mystuff, a ctrl-c gives me the debug menu (Action (h for
> help)) instead of exiting prolog.
> 
> For information (It may be usefull, I don't know), I'm running the
> SWI-Prolog version 3.3.2

Note that signal-handling state is not part of the saved state.  So, you
need

:- initialization on_signal(int, _, my_handler).

See initialization/1 for details.

	Regards --- Jan