[Openmcl-devel] interrupt process (control-c) with CCL saved images

Gary Byers gb at clozure.com
Wed Jan 18 20:58:52 UTC 2012


One way is to call

(#_signal #$SIGINT (%null-ptr))

early in your startup code.

It'd be nicer to be able to use the symbolic constant $SIG_DFL
instead of the null pointer; whether that works or not depends
on how SIG_DFL is defined in the system header files and on how
much sense the interface translator made of that definition. On
Darwin, the definition looks like:

/* DO NOT REMOVE THE COMMENTED OUT int: fixincludes needs to see them */
#define SIG_DFL         (void (*)(/*int*/))0

and I frankly don't blame the interface translator for giving up
on that ...

That (using #_signal) is Unix-specific.  On Windows, there's a
way of disestablishing the handler that handles ^C and a few
other events, and that might be adequate.

Note that when a thread is created, it establishes an ABORT
restart which just terminates that thread; calling ABORT
(or typing :A in a break loop) transfers control to the most
recently established ABORT restart.  The REPL thread establishes
other ABORT restarts (so :A's documentation is correct in the
context of the REPL, but possibly misleading otherwise.)?

On Wed, 18 Jan 2012, Mark H. David wrote:

> 
> In a saved image, when I abort (:a) in a breakpoint called from
> 
> my custom top level function, the process goes away, such that
> 
> when I type control-c into the Lisp, nothing happens.? The ^C's
> 
> just get echoed.? What's an easy way to do what I want, which is
> 
> to have the process just die (if started from a shell, go back to the
> 
> shell prompt, for example)?
> 
> 
> 
>



More information about the Openmcl-devel mailing list