<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
<style>
div.plaintext { white-space: normal; }
body { font-family: sans-serif; }
blockquote.embedded,div.plaintext blockquote { margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777; }
blockquote.embedded blockquote.embedded,div.plaintext blockquote blockquote { border-left-color: #999999; color: #999999; }
blockquote.embedded blockquote.embedded blockquote.embedded,div.plaintext blockquote blockquote blockquote { border-left-color: #BBBBBB; color: #BBBBBB; }
div.plaintext a { color: #3983C4; }
blockquote.embedded,div.plaintext blockquote a { color: #777777; }
blockquote.embedded blockquote.embedded,div.plaintext blockquote blockquote a { color: #999999; }
blockquote.embedded blockquote.embedded blockquote.embedded,div.plaintext blockquote blockquote blockquote a { color: #BBBBBB; }
div.plaintext math[display="inline"] > mrow { padding:5px; }
div.plaintext div.footnotes li p { margin: 0.2em 0; }
div.plaintext .task-list-item { list-style-type: none; }
</style>
</head>
<body><div class="plaintext"><p dir="auto">On 2024-08-11 at 18:34:30 UTC-0400 (Sun, 11 Aug 2024 18:34:30 -0400)
<br />
Richard L. Hamilton <rlhamil@smart.net>
<br />
is rumored to have said:</p>
<blockquote><p dir="auto">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.</p>
</blockquote><p dir="auto">Right. It is clearly a bug.</p>
<blockquote><p dir="auto">Makes me wonder if they're using libncurses or something like it, but not using it properly.</p>
</blockquote><p dir="auto">The Apple build uses libedit. If I build the current version source with or without --enable-editline, I cannot reproduce the bug. Looks like an Apple-specific problem.</p>
<br /><blockquote><p dir="auto">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):</p>
<p dir="auto">     SIGURG          discard signal          urgent condition present on socket
<br />
     SIGCONT         discard signal          continue after stop
<br />
     SIGCHLD         discard signal          child status has changed
<br />
     SIGIO           discard signal          I/O is possible on a descriptor
<br />
     SIGWINCH        discard signal          Window size change
<br />
     SIGINFO         discard signal          status request from keyboard</p>
</blockquote><p dir="auto">Right, but anything that does interactive command line editing like bc needs to handle SIGWINCH.</p>
<blockquote><p dir="auto">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).</p>
</blockquote><p dir="auto">Firmly setting the bug in Apple's lap.</p>
<br /><blockquote><blockquote><p dir="auto">On Aug 11, 2024, at 10:37, Bill Cole <macportsusers-20171215@billmail.scconsult.com> wrote:</p>
<p dir="auto">On 2024-08-11 at 03:08:11 UTC-0400 (Sun, 11 Aug 2024 02:08:11 -0500)
<br />
Ryan Carsten Schmidt <ryandesign@macports.org <<a href="mailto:ryandesign@macports.org">mailto:ryandesign@macports.org</a>>>
<br />
is rumored to have said:</p>
<p dir="auto">On Aug 11, 2024, at 00:03, Richard L. Hamilton wrote:</p>
<p dir="auto">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)</p>
<p dir="auto">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.</p>
<p dir="auto">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.</p>
<p dir="auto">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.</p>
<p dir="auto">   bill@scconsult.com <<a href="mailto:bill@scconsult.com">mailto:bill@scconsult.com</a>> or billcole@apache.org <<a href="mailto:billcole@apache.org">mailto:billcole@apache.org</a>>
<br />
   (AKA @grumpybozo@toad.social <<a href="mailto:grumpybozo@toad.social">mailto:grumpybozo@toad.social</a>> and many *@billmail.scconsult.com addresses)
<br />
   Not Currently Available For Hire</p>
</blockquote></blockquote><br /></div><div id="391C2EDB-51F2-44BE-8BBE-77E1377A3737"><pre>
   bill@scconsult.com or billcole@apache.org
   (AKA @grumpybozo@toad.social and many *@billmail.scconsult.com addresses)
   Not Currently Available For Hire
</pre></div>

</body>

</html>