Package: bash Version: 3.1dfsg-8 Severity: normal I've found the bug of "clear_console".
It happened on shutdown process. If "login" was killed before "bash", the session will be gone. So ttyname() will return NULL. Then "clear_console" will die with SEGV if .bash_logout runs "clear_console". The attached patch fixes it by does nothing if stdin is not tty. -- OGAWA Hirofumi <[EMAIL PROTECTED]>
--- bash-3.1dfsg/debian/clear_console.c.orig 2007-11-19 03:52:34.000000000 +0900 +++ bash-3.1dfsg/debian/clear_console.c 2007-11-19 03:45:10.000000000 +0900 @@ -139,6 +139,9 @@ int is_pseudo_tty(int fd) { char *tty = ttyname(fd); + if (tty == NULL) + return -1; + if (!strncmp(tty, "/dev/pts/", 9)) return 1;