rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

asksign, askinteger loops when typing CTRL-D #179

Open rtoy opened 3 months ago

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-02 08:14:43 Created by dauti on 2016-10-01 09:40:09 Original: https://sourceforge.net/p/maxima/bugs/3225


I accidently typed CTRL-D when Maxima asked a question - the result was a loop, which could only be interrupted by CTRL-C.

eg.

askinteger(a);  /* and then type ctrl-d */
Acceptable answers are: yes, y, Y, no, n, N, unknown, uk
Is a an integer?

Acceptable answers are: yes, y, Y, no, n, N, unknown, uk
Is a an integer?

[...]

or

asksign(a); /* and then type CTRL-D */

That issue seem to be Lisp dependent, clisp and gcl are affected, ecl and sbcl not (there the question is asked again and the user may enter a input again).

Best regards, Wolfgang

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-02 08:14:45 Created by robert_dodier on 2016-11-19 20:59:11 Original: https://sourceforge.net/p/maxima/bugs/3225/#5d45


Seems to be related to https://sourceforge.net/p/maxima/bugs/472/.

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-02 08:14:47 Created by robert_dodier on 2022-11-03 16:44:55 Original: https://sourceforge.net/p/maxima/bugs/3225/#a2d2


rtoy commented 3 months ago

Imported from SourceForge on 2024-07-02 08:14:49 Created by robert_dodier on 2022-11-03 16:44:56 Original: https://sourceforge.net/p/maxima/bugs/3225/#ca92


I wonder if this is an interaction with readline.

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-02 08:14:51 Created by yycamm on 2022-11-13 13:58:24 Original: https://sourceforge.net/p/maxima/bugs/3225/#915a


Confirmed this is not dependent on readline. I believe CTRL-D closes standard input,so maxima would need to check for this to avoid the loop. clisp apparently has the same behavior. The lisp system should not abort on closing standard input as GCL does not, as far as I understand.