Date: Fri, 20 Sep 2024 16:51:20 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 281574] bc(1) runs in endless loop Message-ID: <bug-281574-227-IhzjyIyO8k@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-281574-227@https.bugs.freebsd.org/bugzilla/> References: <bug-281574-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D281574 --- Comment #4 from John F. Carr <jfc@mit.edu> --- I was looking in the wrong place for bc when I commented on the change hist= ory. Source directory usr.bin/bc is not the one that is installed. (That one a= lso behaves oddly in response to ^D, probably due to the "error QUIT" rule in t= he grammar not causing it to quit.) Here is what truss says when I type ^D to an older bc, version 5.2.2 or 6.7= .6: 28787: ioctl(0,TIOCSETAW,0x75c7d3a5b264) =3D 0 (0x0) 28787: read(0,"\^D",1) =3D 1 (0x1) 28787: fstat(1,{ mode=3Dcrw--w---- ,inode=3D96,size=3D0,blksize=3D4096 }) = =3D 0 (0x0) 28787: ioctl(1,TIOCGETA,0x4c2f87f0125c) =3D 0 (0x0) 28787: write(1,"^D",2) =3D 2 (0x2) 28787: ioctl(0,TIOCSETAW,0x75c7d3a5b238) =3D 0 (0x0) 28787: write(1,"\n",1) =3D 1 (0x1) 28787: ioctl(0,TIOCSETAF,0x75c7d3a5b20c) =3D 0 (0x0) 28787: exit(0x0) All is well despite the odd behavior of a literal ^D being read. If I have 7.0.1 then it does not quit and truss says 37822: ioctl(0,TIOCSETAW,0x88d4efe5b264) =3D 0 (0x0) 37822: read(0,"\^D",1) =3D 1 (0x1) 37822: fstat(1,{ mode=3Dcrw------- ,inode=3D45,size=3D0,blksize=3D4096 }) = =3D 0 (0x0) 37822: ioctl(1,TIOCGETA,0x7ddad4152e7c) =3D 0 (0x0) 37822: write(1,"^D",2) =3D 2 (0x2) 37822: ioctl(0,TIOCSETAW,0x88d4efe5b238) =3D 0 (0x0) 37822: sigprocmask(SIG_BLOCK,{ SIGWINCH },{ }) =3D 0 (0x0) 37822: ioctl(0,TIOCGWINSZ,0x7ddad4153100) =3D 0 (0x0) 37822: sigprocmask(SIG_SETMASK,{ },0x0) =3D 0 (0x0) 37822: ioctl(0,TIOCGETA,0x88d4efe5b290) =3D 0 (0x0) 37822: ioctl(0,TIOCSETAW,0x88d4efe5b264) --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-281574-227-IhzjyIyO8k>