Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Sep 2024 15:53:03 +0100
From:      Warner Losh <imp@bsdimp.com>
To:        Cy Schubert <Cy.Schubert@cschubert.com>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: change in /usr/bin/bc with CTRL-d no longer exit
Message-ID:  <CANCZdfpe86cZeabqAvpo-q1OtYxLggo7s9rZkreFKX=PqA=Ojw@mail.gmail.com>
In-Reply-To: <20240916141330.995C554A@slippy.cwsent.com>
References:  <1e614684-1cba-ef01-34dc-d9300db2d927@macktronics.com> <ZudpAKZS7JgS9ZZ_@int21h> <20240916141330.995C554A@slippy.cwsent.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Mon, Sep 16, 2024, 3:13 PM Cy Schubert <Cy.Schubert@cschubert.com> wrote:

> In message <ZudpAKZS7JgS9ZZ_@int21h>, void writes:
> > On Sun, Sep 15, 2024 at 03:16:46PM -0500, Dan Mack wrote:
> > >On 14.1 and prior, a CTRL-d will exit a bc session.
> > >
> > >Today I noticed that on 3 different 15-CURRENT systems, it appears to
> > >be ignored.  Works fine otherwise and I can exit the bc session with
> > >the 'quit' command okay.
> > >
> > >I re-tested this on the system console on fresh login just to rule out
> > >any terminal madness.
> > >
> > >Here's a paste of what I see:
> > >
> > >https://tpaste.us/VYya
> > >
> > >I did a fresh install of 14.1 and it works as it did previously.
> > >
> > >No biggie, just wondering if anyone else on -CURRENT can confirm/deny
> > >this change on their system.
> >
> > [void@vm5 ~ ] uname -KU
> > 1400504 1400504
> > [void@vm5 ~ ] echo 2+2 | bc -l
> > 4
> >
> > [void@vm3 ~ ] uname -KU
> > 1500023 1500023
> > [void@vm3 ~ ] echo 2+2 | bc -l
> > 4
>
> Of course the above works because the regression only affects tty users.
> bc(1) now ignores EOF on the terminal while the above still works. You can
> circumvent this by putting "export BC_TTY_MODE=0" into your .profile. The
> side effect is that line editing will no longer work.
>

The irony here is that i fixed thus very bug 2 or 3 years ago.

Warner

> --
> Cheers,
> Cy Schubert <Cy.Schubert@cschubert.com>
> FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  https://FreeBSD.org
> NTP:           <cy@nwtime.org>    Web:  https://nwtime.org
>
>                         e^(i*pi)+1=0
>
>
>
>

[-- Attachment #2 --]
<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 16, 2024, 3:13 PM Cy Schubert &lt;<a href="mailto:Cy.Schubert@cschubert.com">Cy.Schubert@cschubert.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In message &lt;ZudpAKZS7JgS9ZZ_@int21h&gt;, void writes:<br>
&gt; On Sun, Sep 15, 2024 at 03:16:46PM -0500, Dan Mack wrote:<br>
&gt; &gt;On 14.1 and prior, a CTRL-d will exit a bc session.<br>
&gt; &gt;<br>
&gt; &gt;Today I noticed that on 3 different 15-CURRENT systems, it appears to <br>
&gt; &gt;be ignored.  Works fine otherwise and I can exit the bc session with <br>
&gt; &gt;the &#39;quit&#39; command okay.<br>
&gt; &gt;<br>
&gt; &gt;I re-tested this on the system console on fresh login just to rule out <br>
&gt; &gt;any terminal madness.<br>
&gt; &gt;<br>
&gt; &gt;Here&#39;s a paste of what I see:<br>
&gt; &gt;<br>
&gt; &gt;<a href="https://tpaste.us/VYya" rel="noreferrer noreferrer" target="_blank">https://tpaste.us/VYya</a><br>;
&gt; &gt;<br>
&gt; &gt;I did a fresh install of 14.1 and it works as it did previously.<br>
&gt; &gt;<br>
&gt; &gt;No biggie, just wondering if anyone else on -CURRENT can confirm/deny <br>
&gt; &gt;this change on their system.<br>
&gt;<br>
&gt; [void@vm5 ~ ] uname -KU<br>
&gt; 1400504 1400504<br>
&gt; [void@vm5 ~ ] echo 2+2 | bc -l<br>
&gt; 4<br>
&gt;<br>
&gt; [void@vm3 ~ ] uname -KU<br>
&gt; 1500023 1500023<br>
&gt; [void@vm3 ~ ] echo 2+2 | bc -l<br>
&gt; 4<br>
<br>
Of course the above works because the regression only affects tty users. <br>
bc(1) now ignores EOF on the terminal while the above still works. You can <br>
circumvent this by putting &quot;export BC_TTY_MODE=0&quot; into your .profile. The <br>
side effect is that line editing will no longer work.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">The irony here is that i fixed thus very bug 2 or 3 years ago.</div><div dir="auto"><br></div><div dir="auto">Warner </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-- <br>
Cheers,<br>
Cy Schubert &lt;<a href="mailto:Cy.Schubert@cschubert.com" target="_blank" rel="noreferrer">Cy.Schubert@cschubert.com</a>&gt;<br>
FreeBSD UNIX:  &lt;cy@FreeBSD.org&gt;   Web:  <a href="https://FreeBSD.org" rel="noreferrer noreferrer" target="_blank">https://FreeBSD.org</a><br>;
NTP:           &lt;<a href="mailto:cy@nwtime.org" target="_blank" rel="noreferrer">cy@nwtime.org</a>&gt;    Web:  <a href="https://nwtime.org" rel="noreferrer noreferrer" target="_blank">https://nwtime.org</a><br>;
<br>
                        e^(i*pi)+1=0<br>
<br>
<br>
<br>
</blockquote></div></div></div>
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpe86cZeabqAvpo-q1OtYxLggo7s9rZkreFKX=PqA=Ojw>