Package: bash Version: 4.3-11+deb8u1 Severity: normal Dear Maintainer,
there is a race condition in debians clear_console.c. This results in unexpected tty switches. The below patch addresses the problem. Please consider merging this back in. Thank you for your time, Erik --- a/debian/clear_console.c +++ b/debian/clear_console.c @@ -167,7 +167,7 @@ int clear_console(int fd) { - int num, tmp_num; + int num, tmp_num, ret; #if defined(__linux__) struct vt_stat vtstat; #endif @@ -209,7 +209,12 @@ exit(1); } - if (ioctl(fd, VT_WAITACTIVE, tmp_num)) + do + { + ret = ioctl(fd, VT_WAITACTIVE, tmp_num); + } while (ret && errno == EINTR); + + if (ret != 0) { if (!quiet) perror("VT_WAITACTIVE"); @@ -224,7 +229,12 @@ exit(1); } - if (ioctl(fd, VT_WAITACTIVE, num)) + do + { + ret = ioctl(fd, VT_WAITACTIVE, num); + } while (ret && errno == EINTR); + + if (ret != 0) { if (!quiet) perror("VT_WAITACTIVE"); -- System Information: Debian Release: 8.8 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages bash depends on: ii base-files 8+deb8u8 ii dash 0.5.7-4+b1 ii debianutils 4.4+b1 ii libc6 2.19-18+deb8u9 ii libncurses5 5.9+20140913-1+b1 ii libtinfo5 5.9+20140913-1+b1 Versions of packages bash recommends: ii bash-completion 1:2.1-4 Versions of packages bash suggests: pn bash-doc <none> -- no debconf information