[Top][All Lists]

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

Re: [Bug-apl] Yet another editor thingy.

From: Chris Moller
Subject: Re: [Bug-apl] Yet another editor thingy.
Date: Mon, 30 Jul 2018 09:59:31 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Here's an even simpler, more direct, patch:

Index: LineInput.cc
--- LineInput.cc        (revision 1054)
+++ LineInput.cc        (working copy)
@@ -966,6 +966,11 @@
 const int b0 = fgetc(stdin);
    if (b0 == EOF)
+       if (errno == EINTR) {
+         clearerr (stdin);
+         CIN.unsetf( std::ios_base::unitbuf );
+         goto again;
+       }
        if (got_WINCH)
             got_WINCH = false;

On 29/07/18 22:00, Chris Moller wrote:

Ultimately, that's exactly what happens, but "goto again;" didn't work

Though I just thought of something I'll try in the morning...

On 29/07/18 21:19, Xiao-Yong Jin wrote:
EINTR could happen in many situations.
The usual resolution for EINTR is to retry whatever system call that failed because of EINTR.
Here, we should call fgetc again.


On Jul 29, 2018, at 4:10 PM, Chris Moller <address@hidden> wrote:

Hi, Jürgen,

So far as I  can tell, after all the testing I can throw at it, my editor interface function is ready for the world.  Unfortunately, it needs a small patch to APL itself:

reply via email to

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