[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ANN: ncurses-6.4-20240330
From: |
Thomas Dickey |
Subject: |
Re: ANN: ncurses-6.4-20240330 |
Date: |
Tue, 2 Apr 2024 19:47:23 -0400 |
On Tue, Apr 02, 2024 at 04:31:44PM +0200, Benno Schulenberg wrote:
>
> Op 31-03-2024 om 01:05 schreef Thomas Dickey:
> > 20240330
> > + remove masking of ISIG in cbreak() (report by Benno Schulenberg).
>
> It makes no difference. I still need to mask ISIG after calling
> halfdelay() in order to get ^C seen as a keystroke during the delay.
>
> Or am I misunderstanding the change here?
sort of. Bear in mind that this is in an area where I don't have a
lot of flexibility, since this isn't a feature invented by ncurses
which may require some polishing:
a) if ncurses is definitely (and unexpectedly) different from
SVr4, I may amend it, for compatibility. X/Open Curses
adds features, but generally assumes SVr4 curses (except
for some unrealized suggestions for more generality).
b) if ncurses is (expected to be) different from SVr4, that
needs documentation.
c) X/Open Curses has a few warts (which I point out in the
manpages). It may have oversimplified something from
SVr4 (and that calls for documentation).
In my initial response, I noticed that cbreak was using ISIG,
and nocbreak was not, which seems inconsistent (unless of course Eric
had in mind some platform where that ISIG was needed). But I started
considering why ISIG might have been related to ncurses's signal handlers
(which are outside the X/Open Curses definition). Comparing ncurses's
cbreak/nocbreak with Solaris (illumos), I noticed that really the only
difference was that ISIG. So I tested both ways - Solaris SVr4 curses
versus ncurses, and ncurses without the ISIG -- found no difference.
Either way, calling cbreak allows SIGINT, SIGQUIT to work.
So I decided to remove the ISIG -- unless someone finds a configuration
where it's actually needed (or shows that the change broke something :-)
halfdelay uses cbreak. You can "undo" that using nocbreak
(though of course that may not return to the starting point),
or you could use reset_prog_mode.
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
signature.asc
Description: PGP signature