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>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000008d472706223dbb34
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Sep 16, 2024, 3:13=E2=80=AFPM Cy Schubert <Cy.Schubert@cschubert.co=
m> 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 ca=
n
> circumvent this by putting "export BC_TTY_MODE=3D0" into your .profile. T=
he
> 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=3D0
>
>
>
>

--0000000000008d472706223dbb34
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><br><br><div class=3D"gmail_quote"><div dir=3D"ltr" =
class=3D"gmail_attr">On Mon, Sep 16, 2024, 3:13=E2=80=AFPM Cy Schubert &lt;=
<a href=3D"mailto:Cy.Schubert@cschubert.com">Cy.Schubert@cschubert.com</a>&=
gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0=
 .8ex;border-left:1px #ccc solid;padding-left:1ex">In message &lt;ZudpAKZS7=
JgS9ZZ_@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.=C2=A0 Works fine otherwise and I can exit the bc sessi=
on 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=3D"https://tpaste.us/VYya" rel=3D"noreferrer noreferrer" t=
arget=3D"_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.<b=
r>
&gt; &gt;<br>
&gt; &gt;No biggie, just wondering if anyone else on -CURRENT can confirm/d=
eny <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. <b=
r>
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=3D0&quot; into your .pr=
ofile. The <br>
side effect is that line editing will no longer work.<br></blockquote></div=
></div><div dir=3D"auto"><br></div><div dir=3D"auto">The irony here is that=
 i fixed thus very bug 2 or 3 years ago.</div><div dir=3D"auto"><br></div><=
div dir=3D"auto">Warner=C2=A0</div><div dir=3D"auto"><div class=3D"gmail_qu=
ote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-le=
ft:1px #ccc solid;padding-left:1ex">
-- <br>
Cheers,<br>
Cy Schubert &lt;<a href=3D"mailto:Cy.Schubert@cschubert.com" target=3D"_bla=
nk" rel=3D"noreferrer">Cy.Schubert@cschubert.com</a>&gt;<br>
FreeBSD UNIX:=C2=A0 &lt;cy@FreeBSD.org&gt;=C2=A0 =C2=A0Web:=C2=A0 <a href=
=3D"https://FreeBSD.org" rel=3D"noreferrer noreferrer" target=3D"_blank">ht=
tps://FreeBSD.org</a><br>
NTP:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&lt;<a href=3D"mailto:cy@nwtim=
e.org" target=3D"_blank" rel=3D"noreferrer">cy@nwtime.org</a>&gt;=C2=A0 =C2=
=A0 Web:=C2=A0 <a href=3D"https://nwtime.org" rel=3D"noreferrer noreferrer"=
 target=3D"_blank">https://nwtime.org</a><br>;
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 e^(i*pi)+1=3D0<br>
<br>
<br>
<br>
</blockquote></div></div></div>

--0000000000008d472706223dbb34--



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