ncurese nodelay problem - Redhat

This is a discussion on ncurese nodelay problem - Redhat ; Hi, I am currently porting a very large application from SCO to RHEL. I have a tricky issue with the ncurses library. It is blocking on getch calls, despite nodelay being correctly set. The code has been working on SCO ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: ncurese nodelay problem

  1. ncurese nodelay problem

    Hi,

    I am currently porting a very large application from SCO to RHEL.

    I have a tricky issue with the ncurses library. It is blocking on
    getch calls, despite nodelay being correctly set. The code has been
    working on SCO Openserver 5.0.x for over 15 years.

    I have tried different versions of the library, but all exhibit
    identical behaviour.

    I have seen a couple of old newsgroup posts requesting help with this
    issue, but there have been no adequat responses.

    Has anyone come across this issue in the past, and solved it please?

    TIA

    FB

  2. Re: ncurese nodelay problem

    On 8 Sep, 10:33, FurtiveBertie wrote:
    > Hi,
    >
    > I am currently porting a very large application from SCO to RHEL.
    >
    > I have a tricky issue with the ncurses library. * It is blocking on
    > getch calls, despite nodelay being correctly set. *The code has been
    > working on SCO Openserver 5.0.x for over 15 years.
    >
    > I have tried different versions of the library, but all exhibit
    > identical behaviour.
    >
    > I have seen a couple of old newsgroup posts requesting help with this
    > issue, but there have been no adequat responses.
    >
    > Has anyone come across this issue in the past, and solved it please?
    >
    > TIA
    >
    > FB


    I'm also involved in this: The RHEL is RHEL 5, which is ncurses-5.5.
    The SCO code is fascinating old stuff, on SCO OpenServer 5.0.6, built
    with a manually compiled gcc-2.7.2 and the SCO Skunkware version of
    ncurses-4.2.

  3. Re: ncurese nodelay problem

    Nico Kadel-Garcia wrote:
    > On 8 Sep, 10:33, FurtiveBertie wrote:
    >> Hi,
    >>
    >> I am currently porting a very large application from SCO to RHEL.
    >>
    >> I have a tricky issue with the ncurses library. ? It is blocking on
    >> getch calls, despite nodelay being correctly set. ?The code has been
    >> working on SCO Openserver 5.0.x for over 15 years.
    >>
    >> I have tried different versions of the library, but all exhibit
    >> identical behaviour.
    >>
    >> I have seen a couple of old newsgroup posts requesting help with this
    >> issue, but there have been no adequat responses.
    >>
    >> Has anyone come across this issue in the past, and solved it please?
    >>
    >> TIA
    >>
    >> FB

    >
    > I'm also involved in this: The RHEL is RHEL 5, which is ncurses-5.5.
    > The SCO code is fascinating old stuff, on SCO OpenServer 5.0.6, built
    > with a manually compiled gcc-2.7.2 and the SCO Skunkware version of
    > ncurses-4.2.


    ncurses 4.2 is 10 years old (I'm confused about the comment about 15 years).

    The ncurses test-programs use nodelay() in several places, and work fine.

    I seem to recall some old newsgroup comments (no bug reports) about
    timeout() - more details in any case would be useful.

    --
    Thomas E. Dickey
    http://invisible-island.net
    ftp://invisible-island.net

  4. Re: ncurese nodelay problem

    Thomas E. Dickey wrote:
    > Nico Kadel-Garcia wrote:
    >> On 8 Sep, 10:33, FurtiveBertie wrote:
    >>> Hi,
    >>>
    >>> I am currently porting a very large application from SCO to RHEL.
    >>>
    >>> I have a tricky issue with the ncurses library. ? It is blocking on
    >>> getch calls, despite nodelay being correctly set. ?The code has been
    >>> working on SCO Openserver 5.0.x for over 15 years.
    >>>
    >>> I have tried different versions of the library, but all exhibit
    >>> identical behaviour.
    >>>
    >>> I have seen a couple of old newsgroup posts requesting help with this
    >>> issue, but there have been no adequat responses.
    >>>
    >>> Has anyone come across this issue in the past, and solved it please?
    >>>
    >>> TIA
    >>>
    >>> FB

    >> I'm also involved in this: The RHEL is RHEL 5, which is ncurses-5.5.
    >> The SCO code is fascinating old stuff, on SCO OpenServer 5.0.6, built
    >> with a manually compiled gcc-2.7.2 and the SCO Skunkware version of
    >> ncurses-4.2.

    >
    > ncurses 4.2 is 10 years old (I'm confused about the comment about 15 years).


    Welcome to SCO OpenServer 5.0.6, which is similarly old. The software base is
    roughly 15 years old. The ncurses in use on the SCO side is ncurses-4.2,
    although the software may well have started with an even older version of ncurses.

    More details as I get them: porting the stuff to RHEL has been a major
    adventure, for many reasons.

  5. Re: ncurese nodelay problem

    Nico Kadel-Garcia wrote:
    >>> The SCO code is fascinating old stuff, on SCO OpenServer 5.0.6, built
    >>> with a manually compiled gcc-2.7.2 and the SCO Skunkware version of
    >>> ncurses-4.2.

    >>
    >> ncurses 4.2 is 10 years old (I'm confused about the comment about 15 years).

    >
    > Welcome to SCO OpenServer 5.0.6, which is similarly old. The software base is
    > roughly 15 years old. The ncurses in use on the SCO side is ncurses-4.2,
    > although the software may well have started with an even older version of ncurses.


    I have a copy (on a Pentium III box...) of 5.05e, though I forget (without
    booting it and checking) if that's older than 1998. I do recall that it
    had some Skunkworks stuff, but my interest in that system was for SCO's
    curses (two implementations).

    > More details as I get them: porting the stuff to RHEL has been a major
    > adventure, for many reasons.


    Aside from bug-fixes, going from 4.2 to 5.5 should be no surprise.

    (current release is 5.6; I'm paring down my to-do list to finish 5.7).

    --
    Thomas E. Dickey
    http://invisible-island.net
    ftp://invisible-island.net

  6. Re: ncurese nodelay problem

    FurtiveBertie wrote:
    > On 17 Sep, 10:14, FurtiveBertie wrote:
    >> On 8 Sep, 21:24, dic...@invisible-island.net (Thomas E. Dickey) wrote:
    >> > Nico Kadel-Garcia wrote:
    >> > >>> The SCO code is fascinating old stuff, on SCO OpenServer 5.0.6, built
    >> > >>> with a manually compiled gcc-2.7.2 and the SCO Skunkware version of
    >> > >>> ncurses-4.2.

    >>
    >> > >> ncurses 4.2 is 10 years old (I'm confused about the comment about 15 years).

    ....
    >> I have narrowed this down, and got an idea of what is going wrong :-)


    thanks. I ran your test-program on Solaris 10 and IRIX64, found that it
    behaves as you expect.

    Back to ncurses - the problem is older than ncurses 4.2, apparently from
    the original implementation of the feature in ncurses 1.9.2d in June
    1995.

    (It's been a while since I ran into one from the pre-1.9.9e era ;-)

    The change:

    diff -u -r1.98 base/lib_getch.c
    --- base/lib_getch.c 2008/08/16 21:20:48 1.98
    +++ base/lib_getch.c 2008/09/20 19:46:13
    @@ -381,7 +381,7 @@

    recur_wrefresh(win);

    - if (!win->_notimeout && (win->_delay >= 0 || sp->_cbreak > 1)) {
    + if (win->_notimeout || (win->_delay >= 0) || (sp->_cbreak > 1)) {
    if (head == -1) { /* fifo is empty */
    int delay;
    int rc;

    That "!win->_notimeout" is the same in 1995, and is the only place that
    the value is checked (or should be checked). I'm puzzled by your reference
    to ncurses 4.2, since the bug in (the original) version of that as well
    (and I was unaware of any patched version).

    --
    Thomas E. Dickey
    http://invisible-island.net
    ftp://invisible-island.net

  7. Re: ncurese nodelay problem

    Thomas E. Dickey wrote:
    > FurtiveBertie wrote:
    >> On 17 Sep, 10:14, FurtiveBertie wrote:
    >>> On 8 Sep, 21:24, dic...@invisible-island.net (Thomas E. Dickey) wrote:
    >>>> Nico Kadel-Garcia wrote:
    >>>>>>> The SCO code is fascinating old stuff, on SCO OpenServer 5.0.6, built
    >>>>>>> with a manually compiled gcc-2.7.2 and the SCO Skunkware version of
    >>>>>>> ncurses-4.2.
    >>>>>> ncurses 4.2 is 10 years old (I'm confused about the comment about 15 years).

    > ....
    >>> I have narrowed this down, and got an idea of what is going wrong :-)

    >
    > thanks. I ran your test-program on Solaris 10 and IRIX64, found that it
    > behaves as you expect.
    >
    > Back to ncurses - the problem is older than ncurses 4.2, apparently from
    > the original implementation of the feature in ncurses 1.9.2d in June
    > 1995.
    >
    > (It's been a while since I ran into one from the pre-1.9.9e era ;-)
    >
    > The change:
    >
    > diff -u -r1.98 base/lib_getch.c
    > --- base/lib_getch.c 2008/08/16 21:20:48 1.98
    > +++ base/lib_getch.c 2008/09/20 19:46:13
    > @@ -381,7 +381,7 @@
    >
    > recur_wrefresh(win);
    >
    > - if (!win->_notimeout && (win->_delay >= 0 || sp->_cbreak > 1)) {
    > + if (win->_notimeout || (win->_delay >= 0) || (sp->_cbreak > 1)) {
    > if (head == -1) { /* fifo is empty */
    > int delay;
    > int rc;
    >
    > That "!win->_notimeout" is the same in 1995, and is the only place that
    > the value is checked (or should be checked). I'm puzzled by your reference
    > to ncurses 4.2, since the bug in (the original) version of that as well
    > (and I was unaware of any patched version).
    >


    The system in question, where it works and has for years, is a fairly strange
    SCO OpenServer 5.0.x environment with ncurses-4.2 installed, but with the
    curses.h and ncurses.h files moved aside to avoid their use at compilation
    time, and a hand-built similarly antique version of gcc. We're talking a
    fairly strange mix of old components where it works. The project is migrating
    everything to a *MUCH* more recent platform, RHEL 5, for lots of good reasons.

  8. Re: ncurese nodelay problem

    Nico Kadel-Garcia wrote:
    > Thomas E. Dickey wrote:
    >> That "!win->_notimeout" is the same in 1995, and is the only place that
    >> the value is checked (or should be checked). I'm puzzled by your reference
    >> to ncurses 4.2, since the bug in (the original) version of that as well
    >> (and I was unaware of any patched version).
    >>

    >
    > The system in question, where it works and has for years, is a fairly strange
    > SCO OpenServer 5.0.x environment with ncurses-4.2 installed, but with the
    > curses.h and ncurses.h files moved aside to avoid their use at compilation
    > time, and a hand-built similarly antique version of gcc. We're talking a
    > fairly strange mix of old components where it works. The project is migrating
    > everything to a *MUCH* more recent platform, RHEL 5, for lots of good reasons.


    I see. (It's possible that someone patched it and didn't tell me ;-).

    There are occasional antique bugs - looking at my changelog, I see I fixed
    one in January, and two in August a year ago (out of a little more than
    a thousand changes in the same time period).

    anyway... the fix will be in ncurses 5.7 (upcoming), as well as any packages
    that track ncurses development.

    --
    Thomas E. Dickey
    http://invisible-island.net
    ftp://invisible-island.net

  9. Re: ncurese nodelay problem

    >
    > anyway... the fix will be in ncurses 5.7 (upcoming), as well as any packages
    > that track ncurses development.
    >


    I'm glad you managed to track this down in the source code.
    (And that I am not going mad.)

    Thanks,

    FB

  10. Re: ncurese nodelay problem

    FurtiveBertie wrote:
    >>
    >> anyway... the fix will be in ncurses 5.7 (upcoming), as well as any packages
    >> that track ncurses development.
    >>

    >
    > I'm glad you managed to track this down in the source code.
    > (And that I am not going mad.)


    it was simple, given the sample code
    (it is startling when an _old_ bug surfaces)
    >
    > Thanks,


    no problem (report bugs)

    --
    Thomas E. Dickey
    http://invisible-island.net
    ftp://invisible-island.net

+ Reply to Thread