[Openmcl-devel] A bug and a quick fix

Gary Byers gb at clozure.com
Wed Dec 7 13:43:39 PST 2011

On Wed, 7 Dec 2011, CRLF0710 wrote:

> Sorry. I meant the window in which CUI-based program runs in a
> graphical desktop environment. In this case, i meant exactly the
> window of a ?Win32 console ( please see
> http://en.wikipedia.org/wiki/Win32_console ). The close button is
> shown in the upper-right corner in the second picture within the
> article.

Right.  If you run the Cocotron-based IDE, it provides a console
window for debugging and I wasn't sure if you were talking about
closing that console window (which isn't supposed to be easy) or
just running CCL in a console window (what used to be known as
a "DOS box", I think.)

I usually run under Cygwin, and I don't see the behavior that you
described there (presumably because the Cygwin shell or something in
its runtime handles the control message), but I saw the crash when
running under the standard Windows commmand interpreter (and probably
would have if I'd just double-clicked on wx86cl.exe and run in a
console.)  I have no idea what exactly causes the crash if this
message isn't handled; the symptom you describe indicates some
confusion about whether a lisp thread was still alive (as might happen
if it was killed without being given a chance to clean up after

Your fix below will make CCL act as if it got a SIGQUIT signal and
it'll try to quit in a somewhat orderly fashion (closing files and
running other cleanups first.)  That seems reasonable, but it's probably
not totally unreasonable to just call _exit() or the Windows equivalent
in that case.

> *************************************************************************
> by the way, i think i've fixed the problem by this new patch(old is
> not needed, please revert it if applied). Please review it.
> diff -ruN lisp-kernel.old/x86-exceptions.c lisp-kernel/x86-exceptions.c
> --- lisp-kernel.old/x86-exceptions.c ? ?2011-12-07 21:22:33 +0800
> +++ lisp-kernel/x86-exceptions.c ? ? ? ?2011-12-07 21:20:56 +0800
> @@ -1907,7 +1907,8 @@
> ? ? return TRUE;
> ? ? break;
> ? default:
> - ? ?return FALSE;
> + ? ?lisp_global(INTFLAG) = (2 << fixnumshift);
> + ? ?return TRUE;
> ? }
> ?}
> -- 
> Wir m?sen wissen; wir werden wissen!
> CrLF.0710
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel

More information about the Openmcl-devel mailing list