resizing window when using "bc" in interactive mode
Richard L. Hamilton
rlhamil at smart.net
Sun Aug 11 22:34:30 UTC 2024
Semi-understandable. The default system action for SIGWINCH is to do nothing; i.e. only programs that catch it are even aware of it. That would usually be programs like text editors that do full-window text handling, and probably need to re-fetch the current size and redraw on window size change.
Makes me wonder if they're using libncurses or something like it, but not using it properly.
From sigaction(2) on Monterey, the signals that do nothing by default (although in the case of SIGCHLD at least, ignoring it is a bit different from the default):
SIGURG discard signal urgent condition present on socket
SIGCONT discard signal continue after stop
SIGCHLD discard signal child status has changed
SIGIO discard signal I/O is possible on a descriptor
SIGWINCH discard signal Window size change
SIGINFO discard signal status request from keyboard
I'm not seeing the problem on Ventura, which uses the Gavin Howard bc (if perhaps not the same version as on Sonoma, which I don't have).
> On Aug 11, 2024, at 10:37, Bill Cole <macportsusers-20171215 at billmail.scconsult.com> wrote:
>
> On 2024-08-11 at 03:08:11 UTC-0400 (Sun, 11 Aug 2024 02:08:11 -0500)
> Ryan Carsten Schmidt <ryandesign at macports.org <mailto:ryandesign at macports.org>>
> is rumored to have said:
>
> On Aug 11, 2024, at 00:03, Richard L. Hamilton wrote:
>
> The MacPorts version uses MacPorts supplied libraries (other than libSystem). The macOS version uses macOS supplied libraries. (ultimately from the same open source projects, but potentially different versions and build options, so not identical code)
>
> It's *not* the same software. MacPorts has GNU bc 1.07 which is licensed GPL-3. macOS used to have GNU bc 1.06 released back in 2000 under GPL-2. Apple has switched to someone else's bc implementation in recent macOS probably because as we know Apple is allergic to GPL-3.
>
> The macOS bc is Gavin Howard's version which is also used in FreeBSD. It integrates both the GNU additions to the POSIX-standard bc and its own additions, some of which came from the original BSD bc. There has been a steady trickle of bug fixes since the version Apple ships on Sonoma, some of which reference macOS.
>
> Looking at the man page, I'd bet that exiting when the terminal geometry changes is understandable, since making that change sends a WINCH signal and bc resets on signals for which it has no handler. That gap seems like a bug to me, but one to report to the author or Apple.
>
>
> bill at scconsult.com <mailto:bill at scconsult.com> or billcole at apache.org <mailto:billcole at apache.org>
> (AKA @grumpybozo at toad.social <mailto:grumpybozo at toad.social> and many *@billmail.scconsult.com addresses)
> Not Currently Available For Hire
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20240811/199d4f9d/attachment.htm>
More information about the macports-users
mailing list