On Sun, Jan 01, 2017 at 09:14:45PM -0500, Chet Ramey wrote: > On 1/1/17 4:01 PM, r...@armlinux.org.uk wrote: > > Bash Version: 4.3 > > Patch Level: 30 > > Release Status: release > > > > Description: > > Running: > > while :; do s=$(sleep .005 | cat); echo $s; done | uniq > > in a login shell on a virtual terminal or serial console results > > in the shell randomly logging out after ^C. > > I believe this is fixed in bash-4.4.
Thank you for your reply. However, while testing bash-4.4 with the five additional patches (bringing it to 4.4.5) shows that it is not fixed in bash-4.4 - see below. The line from __tty_check_change() is from the debug I added to the kernel, which shows that the reason for the EIO error is because the tty pgrp doesn't match the process' pgrp. # ps -ef | grep ttyS0 root 29257 1 0 10:44 ttyS0 00:00:00 /bin/login -- root 29293 29257 0 10:45 ttyS0 00:00:00 -bash root@mcbin:~# while :; do s=$(sleep .005 | cat); echo $s; done | uniq ^C root@mcbin:~# while :; do s=$(sleep .005 | cat); echo $s; done | uniq ^C root@mcbin:~# __tty_check_change: tty=ffffffc0e74bd800 current pgrp=29293(ffffffc0e795fc00) tty pgrp=29257(ffffffc0e795f080) logout -- Russell King