[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 3 readline bugs: source positions, readline-options, endless loop on
From: |
Dirk Herrmann |
Subject: |
Re: 3 readline bugs: source positions, readline-options, endless loop on error |
Date: |
Thu, 25 Jan 2001 11:43:23 +0100 (MET) |
On Thu, 25 Jan 2001, Martin Grabmueller wrote:
> Another bug I found: when using `set-readline-input-port!' with an
> invalid argument, Guile goes into an endless loop printing:
>
> ...
> ERROR: In procedure %readline:
> ERROR: Input port is not open or not a file port
> ABORT: (misc-error)
> ERROR: In procedure %readline:
> ERROR: Input port is not open or not a file port
> ABORT: (misc-error)
> ...
>
> and must be kill'ed -9, because C-c is blocked. The reason is that
> `%readline' throws an error because of the wrong type argument, the
> repl catches the error and calls `readline', which in turn calls
> `%readline' and so on...
>
> Two possible fixes came to my mind:
>
> - Check the argument in `set-readline-input-port!' and only accept
> valid open input ports.
> - When the argument check in `%readline' fails, reset the current
> input port to the standard input file port.
>
> I think the first is preferable.
That's what I think, too. Could you provide a patch?
Best regards,
Dirk Herrmann