Lisp HUG Maillist Archive

Forcing a console window to open (in windows)

If I have an image dumped in such a way that it doesn't normally open
a console, is there an easy way to force one to open (if I want to
show a message or something) during init-file processing?

In particular, I've done something like:

    (save-image "lw-dev" ... :console :input ...)

and I'm now running lw-dev to compile stuff:

    lw-dev -init compile-my-system.lisp

then I want it to be able to open a console to print some message
during the processing of compile-my-system.lisp.

What I've tried is something like:

   (listen *terminal-io*)
   (format *terminal-io* ...)

But this seems not to work - it either hangs (having opened a
console), or dies horribly.

I'm running the compilation process under cygwin if that matters
(which it may, I think).

The obvious answer of `don't do that then, dump the initial image with
a console' is what I'm doing now, and it's a fine solution, I was just
morbidly curious if there was anything else I could do.

--tim


Re: Forcing a console window to open (in windows)

> From: "Tim Bradshaw" <tfb@cley.com>
>
> If I have an image dumped in such a way that it doesn't normally
> open
> a console, is there an easy way to force one to open (if I want to
> show a message or something) during init-file processing?

You can call DBG::BRING-CONSOLE-TO-FRONT.

(I've a feeling that a little while ago someone described another way
that didn't use non-exported things, but I can't find it.)



Updated at: 2020-12-10 09:00 UTC