From jan@swi.psy.uva.nl  Tue Jun  6 21:25:49 2000
Received: from gollem.swi.psy.uva.nl (root@gollem [145.18.152.30])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id VAA03005;
	Tue, 6 Jun 2000 21:25:49 +0200 (MET DST)
Received: (from jan@localhost)
	by gollem.swi.psy.uva.nl (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id VAA01188;
	Tue, 6 Jun 2000 21:26:22 +0200
Date: Tue, 6 Jun 2000 21:26:22 +0200
Message-Id: <200006061926.VAA01188@gollem.swi.psy.uva.nl>
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Subject: Re: ctrl-c
To: VIOLLET Frederic <viollet@ensicaen.ismra.fr>, prolog@swi.psy.uva.nl
In-Reply-To: VIOLLET Frederic's message of Tue, 6 Jun 2000 17:47:30 +0200 (MET DST)
Phone: +31 - 20 - 525 6121

> 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

