[BusyBox 0000242]: ash: read -t broken

bugs at busybox.net bugs at busybox.net
Wed Sep 7 16:58:27 UTC 2005


The following issue has been RESOLVED. 
====================================================================== 
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:                     resolved
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             05-02-2005 05:42 PDT
Last Modified:              09-07-2005 09:58 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.
====================================================================== 

---------------------------------------------------------------------- 
 pgf - 09-07-05 09:58  
---------------------------------------------------------------------- 
Committed revision 11351.

in addition to applying the attached patch for -t and -n, i also
implemented the -s (silent) option, since it had recently been submitted
to the list as a patch by Fernando Silveira. 

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                     
09-07-05 09:58  pgf            Status                   assigned => resolved
09-07-05 09:58  pgf            Resolution               open => fixed       
09-07-05 09:58  pgf            Note Added: 0000496                          
======================================================================




More information about the busybox-cvs mailing list