Subject: [clisp-list] interrupting program execution in CLISP under Windows

From: Michel Kervaire <[email-masked]>
Date: Wed Jul 17 08:30:03 2002

Hello,

I am using CLISP version 2.28 (2002-03-03) under Windows NT. 

I would like to know the proper way of interrupting the execution of a program
in order to examine the current values of some variables, and then resume
the execution from the current position.

The use of the key combination CTRL-BREAK actually interrupts the execution 
of a program. Unfortunately, it does not seem possible to resume the execution 
after this interruption.

Here are two examples, displaying different troubles.

1) Execution of the command

      (progn (setq i 1) (dotimes (j 1000000) (incf i)))

Pressing CTRL-BREAK during execution produces
an immediate exit from CLISP to the operating system !

2) Execution of the same command, only preceded by the function #'time,
namely 

      (time (progn (setq i 1) (dotimes (j 1000000) (incf i))))

In this case, pressing CTRL-BREAK indeed interrupts execution,
and displays

    *** - EVAL : User break
    1. Break [...]>

At this point, it is possible to take some actions, like examining the values
of variables. However resuming execution seems impossible. Typing
the word     continue      again produces the immediate exit from CLISP.

Please help me !

Bye.

Michel Kervaire

---

From: Sam Steingold <[email-masked]>
Date: Wed Jul 17 08:54:02 2002

> * In message <[email-masked]>
> * On the subject of "[clisp-list] interrupting program execution in CLISP under Windows"
> * Sent on Wed, 17 Jul 2002 17:37:14 +0200
> * Honorable Michel Kervaire <[email-masked]> writes:
>
> I would like to know the proper way of interrupting the execution of a
> program in order to examine the current values of some variables, and
> then resume the execution from the current position.

Did you try C-c (as opposed to C-BREAK)?
I think they are treated differently.

Arseny Slobodjuck is our resident win32 expert.
I hope he will help you.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.2 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Don't hit a man when he's down -- kick him; it's easier.

---

From: Arseny Slobodjuck <[email-masked]>
Date: Wed Jul 17 17:04:15 2002

>> then resume the execution from the current position.

Sam> Did you try C-c (as opposed to C-BREAK)?
Sam> I think they are treated differently.

Sam> Arseny Slobodjuck is our resident win32 expert.
Sam> I hope he will help you.

I have nothing to add to this. Ctrl-break should end Clisp session,
Ctrl-C - just current program. I'll look why Ctrl-break doesn't
interrupt Clisp session.

-- 
Best regards,
 Arseny                            mailto:[email-masked]

---

From: Michel Kervaire <[email-masked]>
Date: Thu Jul 18 08:35:01 2002

Thank you for your answer. Indeed, C-c does interrupt the current program.
Unfortunately, it is not always possible to resume execution.  The ability
to properly resume execution depends on the message displayed after
pressing C-c:

- If the displayed message contains
                       "** - Continuable Error",
then no problem in this case, pressing ":c" or "continue" resumes execution.

- However, if the displayed message contains instead
     "*** - Ctrl-C: User break",
then resumption seems to be impossible.

I should add that the second possibility does not occur with the simple
program in my previous message. However, it does occur with more
complicated programs.

Best regards,

Michel Kervaire

----- Original Message -----
From: "Arseny Slobodjuck" <[email-masked]>
To: "Michel Kervaire" <[email-masked]>
Cc: <[email-masked]>
Sent: Thursday, July 18, 2002 2:58 AM
Subject: Re[2]: [clisp-list] interrupting program execution in CLISP under
Windows

---

From: lin8080 <[email-masked]>
Date: Mon Aug 12 12:46:01 2002

> Michel Kervaire schrieb:

> program...
> The use of the key combination CTRL-BREAK actually interrupts 

Hallo Michael

There is a way that windows can do something to the Ctrl-C. 
First go to the DOS-Box and type at the Prompt: Break. This will report
on or off. 
When it is off, go to the config.sys and add the line:

BREAK=ON
From the readme in win98 the explain text is:

 This command sets or clears extended CTRL+C 
 checking. You can use this command at the 
 command prompt or in your CONFIG.SYS file.

 You can press CTRL+C to stop a program or an 
 activity, such as file sorting. Typically, MS-DOS 
 checks for CTRL+C only while it reads from the 
 keyboard or writes to the screen or a printer. If 
 you set BREAK to ON, you extend CTRL+C checking to 
 other functions, such as disk read and write 
 operations.

May be on Win NT there is something different?
Hope it helps

stefan

Type SET at the DOS-Prompt to see more details