bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

read -sp xx displays xx before disabling echo.


From: Stephane Chazelas
Subject: read -sp xx displays xx before disabling echo.
Date: Fri, 05 Oct 2007 16:40:18 +0100

Configuration Information [Automatically generated, do not change]:
Machine: i486
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H   -I.  -I../bash -I../bash/include -I../bash/lib   -g -O2
uname output: Linux xxxxxxxxxx 2.6.23-rc6 #1 PREEMPT Sat Sep 15 16:31:30 BST 
2007 i686 GNU/Linux
Machine Type: i486-pc-linux-gnu

Bash Version: 3.1
Patch Level: 17
Release Status: release

Description:
        (same in 3.2.25)

        This is a very minor issue.

        in read -p some-prompt -s password
        The prompt is issued before the terminal echo is disabled, so that the
        user may start typing before the echo is disabled and his password
        become visible.

        Here, 2 in 3 executions of:

        expect -c 'spawn bash -c "read -sp asd:; echo @"; expect "asd:"; send 
"blah\r"; expect "@"'

        actually displays "blah"

        $ strace bash -c 'read -sp asd'
        [...]
        write(2, "asd", 3asd)                      = 3
        [...]
        ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig icanon -echo 
...}) = 0
        [...]
        read(0,





reply via email to

[Prev in Thread] Current Thread [Next in Thread]