diff options
author | Ron Yorston <rmy@pobox.com> | 2023-07-12 11:52:06 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-07-12 11:52:06 +0100 |
commit | 8e699173370d68262273390e1b631300d9c5017c (patch) | |
tree | fd99ba45187323847b29b7bdb3ee5924cc851d25 /init | |
parent | 2a4b086d4848616306f97f6378e0f10a48d41929 (diff) | |
download | busybox-w32-8e699173370d68262273390e1b631300d9c5017c.tar.gz busybox-w32-8e699173370d68262273390e1b631300d9c5017c.tar.bz2 busybox-w32-8e699173370d68262273390e1b631300d9c5017c.zip |
ash: fix 'read' shell built-in (1)
Consider this test case:
{ echo -n te; sleep 3; echo st; } | (read -t 1 x; echo "$x")
- bash echoes "te" after 1 second.
- Upstream BusyBox echoes an empty "$x" after 1 second.
- busybox-w32 echoes an empty "$x" after 3 seconds.
The delayed echo in busybox-w32 arises because the 'read' shell
built-in omits the code to poll for input.
Rearrange the code so that polling takes place. This doesn't address
the difference between BusyBox and bash.
Costs 48-64 bytes.
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions