Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Sep 2024 16:17:19 -0400
From:      Dennis Clarke <dclarke@blastwave.org>
To:        freebsd-current@freebsd.org
Subject:   Re: change in /usr/bin/bc with CTRL-d no longer exit
Message-ID:  <c2db7916-d8b5-4843-b71d-1badde15bdf5@blastwave.org>
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
On 9/16/24 10:13, Cy Schubert 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.

Here is some paint on the bikeshed :

enceladus# uname -apKU
FreeBSD enceladus 15.0-CURRENT FreeBSD 15.0-CURRENT #0 
main-n271918-d7c87526b1c3-dirty: Mon Sep  2 09:55:54 UTC 2024 
root@enceladus:/usr/obj/usr/src/riscv.riscv64/sys/GENERIC riscv riscv64 
1500023 1500023
enceladus#
enceladus# bc -lq
scale=36
a(1)*4
3.141592653589793238462643383279502884
^D
^C
interrupt (type "quit" to exit)
ready for more input
quit
enceladus#

Yep. That is borked.

> 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.
> 
> 

I will have to try that. However why would bc change at all?


-- 
--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c2db7916-d8b5-4843-b71d-1badde15bdf5>