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 | b2901ce8efa050da00e0f3a73f3be9bf9402deea (patch) | |
tree | 6a5d2262a464867c38594f41f8ab5d33047ce307 /arch | |
parent | 8e699173370d68262273390e1b631300d9c5017c (diff) | |
download | busybox-w32-b2901ce8efa050da00e0f3a73f3be9bf9402deea.tar.gz busybox-w32-b2901ce8efa050da00e0f3a73f3be9bf9402deea.tar.bz2 busybox-w32-b2901ce8efa050da00e0f3a73f3be9bf9402deea.zip |
ash: fix 'read' shell built-in (2)
Enabling polling in the previous commit resulted in the following
incorrect behaviour:
{ echo -n te; sleep 3; echo st; } | (read -t 1 x; echo "$x")
An empty "$x" is echoed immediately, not after 1 second.
{ echo -n te; sleep 1; echo st; } | (read -t 3 x; echo "$x")
An empty "$x" is echoed immediately. "test" should be echoed after
1 second.
This arises because poll(2) from gnulib is unable to handle anonymous
pipes properly due do deficiencies in Microsoft Windows. These have
been acknowledged and fixed in relation to select(2):
https://lists.gnu.org/archive/html/bug-gnulib/2014-06/msg00051.html
Apply a similar fix to poll(2).
Costs 104-156 bytes.
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions