[Bug 269292] shells/zsh fails to reset tty state on TMOUT
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 02 Feb 2023 19:08:06 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269292 Bug ID: 269292 Summary: shells/zsh fails to reset tty state on TMOUT Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: bapt@FreeBSD.org Reporter: fbsd@opal.com Flags: maintainer-feedback?(bapt@FreeBSD.org) Assignee: bapt@FreeBSD.org Created attachment 239865 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=239865&action=edit patch to make zsh reset tty modes on TMOUT shells/zsh fails to reset the tty state if it exits due to TMOUT expiration. Repeat by: $ zsh $ stty -a speed 9600 baud; 60 rows; 119 columns; lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo -extproc iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk brkint -inpck -ignpar -parmrk oflags: opost onlcr -ocrnl tab0 -onocr -onlret cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow -dtrflow -mdmbuf rtsdtr cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>; eol2 = <undef>; erase = ^?; erase2 = ^H; intr = ^C; kill = ^U; lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W; $ TMOUT=2 $ .. wait for timeout.. zsh: timeout $ stty -a speed 9600 baud; 60 rows; 119 columns; lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo -extproc iflags: -istrip icrnl inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk brkint -inpck -ignpar -parmrk oflags: opost onlcr -ocrnl tab0 -onocr -onlret cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow -dtrflow -mdmbuf rtsdtr cchars: discard = <undef>; dsusp = <undef>; eof = ^D; eol = <undef>; eol2 = <undef>; erase = ^?; erase2 = ^H; intr = ^C; kill = ^U; lnext = <undef>; min = 1; quit = <undef>; reprint = ^R; start = ^Q; status = ^T; stop = ^S; susp = <undef>; time = 0; werase = ^W; Observe that lots of chars are now <undef> and iflag inlcr is now set when it wasn't before. I am attaching a simple patch to fix this. This should probably be sent upstream too. -- You are receiving this mail because: You are the assignee for the bug.