help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CTRL-C behavior in CLI


From: Jeffrey Tsang
Subject: Re: CTRL-C behavior in CLI
Date: Wed, 25 May 2016 13:18:28 +0000 (UTC)

If CTRL-C is treated as a normal keystroke, what can I do to abort the script if say, the script has a programming mistake that has an infinite number of pause?



From: Tatsuro MATSUOKA <address@hidden>
To: Jeffrey Tsang <address@hidden>; Nicholas Jankowski <address@hidden>
Cc: address@hidden
Sent: Wednesday, May 25, 2016 7:18 PM
Subject: Re: Octave 4.0.1 CTRL-C questions

----- Original Message -----
>From: Jeffrey Tsang 
>To: Tatsuro MATSUOKA ; Nicholas Jankowski  
>Cc: "address@hidden
>Date: 2016/5/25, Wed 20:01
>Subject: Re: Octave 4.0.1 CTRL-C questions
>
>
>I am unable to reproduce the CTRL-C crash problem in Octave 4.0.1 CLI now. I will let you know if I manage to crash it again.
>
>
>Here's another issue with CTRL-C with Octave CLI. If I add another pause to the script to become:
>
>
>clear; close all; clc
>>
>>
>>x = [1; 2; 3; 4];
>>y = x;
>>
>>
>>plot(x, y, 'rx', 'MarkerSize', 10);
>>fprintf('#1 Program paused. Press enter to continue.\n');
>>pause;
>>
>>
>>fprintf('#2 Program paused. Press enter to continue.\n');
>>pause;
>
>
>Now, if you press CTRL-C at "#1 Program paused", the script continues to "# Program paused" instead of being aborted. It looks to me that CTRL-C is treated as a normal keystroke to break out of the pause. I'd have thought that it should abort the script instead.
>
>


I have confirmed the behavior as you pointed out on Octave-CLI.
However, I cannot say it is a bug. It stands on individual thoughts.
 
Anyway I will consult codes for signal handler if I will have time.
(I have quick looked at them. But time restriction prevent me from deep understanding.)

If you have a complaint for the current behavior on octave-CLI, it is better to make another post to the
octave maintainer list but not help list.


Tatsuro



reply via email to

[Prev in Thread] Current Thread [Next in Thread]