[BusyBox] [PATCH] ASH's read bugs

Fernando Silveira fsilveira at gmail.com
Fri Aug 12 01:54:08 UTC 2005

As I'm seeing patches beeing submited in the maillist, I'm posting this
patch both here and in the bug report site. Here follows the

There is some bugs in ASH's read. I've fixed those that I found and
added a new feature. Here they are:

- Timeout:
  - The timeout option counts only the first char: it will stop counting
    the time after you press the first key;

  - When the timeout option is used, the first char cannot be erased and
    is handled wrongly if it is a backslash and/or with IFS environment

  - Some special characters, when in the first field, cannot be shown or
    are treated wrong;

  - The exit code is wrong and the environment variable is empty when
    the timeout is expired;

- Silent:

  - I added a `silent' feature: when the -s argument is provided, the
    characters are not echoed;

The comparisons I made was using `bash' and `zsh'. The patch is

Fernando Silveira <fsilveira at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ash-read.patch
Type: text/x-patch
Size: 4209 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20050811/0988b906/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.busybox.net/pipermail/busybox/attachments/20050811/0988b906/attachment-0002.pgp 

More information about the busybox mailing list