[BusyBox-cvs] [BusyBox 0000242]: ash: read -t broken

bugs at busybox.net bugs at busybox.net
Mon May 2 12:42:55 UTC 2005


The following issue has been SUBMITTED.
======================================================================
<http://busybox.net/bugs/view.php?id=242> 
======================================================================
Reported By:                pgf
Assigned To:                BusyBox
======================================================================
Project:                    BusyBox
Issue ID:                   242
Category:                   Standards Compliance
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
======================================================================
Date Submitted:             05-02-2005 05:42 PDT
Last Modified:              05-02-2005 05:42 PDT
======================================================================
Summary:                    ash:  read -t broken
Description: 

the current implementation of "read -t" in ash doesn't match what other
standard shells do.  it seems to wait for the first character to be
available, in raw mode, rather than waiting for fully-formed user input to
be available, in cooked mode.  i.e. normally if you type "hello<CR>" at a
"read -t 5 foo" command, then unless you type the <CR> before 5 seconds
has passed, $foo won't get anything at all (using bash).  that's not what
the commited code does -- if you type anything at all, it decides you'll
be finishing, and waits forever.

this patch reimplements -t and and implements -n in a bash-compatible way.
 the config option name has been changed from CONFIG_ASH_TIMEOUT to
CONFIG_ASH_READ_TIMEOUT and CONFIG_ASH_READ_NCHARS.

diff is against svn.
======================================================================

Issue History
Date Modified  Username       Field                    Change              
======================================================================
05-02-05 05:42 pgf            New Issue                                    
05-02-05 05:42 pgf            File Added: read-n-t.pat                     
======================================================================




More information about the busybox-cvs mailing list