mirror of
https://git.busybox.net/busybox.git
synced 2024-11-27 23:53:29 +08:00
eae12688c9
function old new delta shell_builtin_read 1097 1277 +180 dump_procs 353 359 +6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 lines
468 B
Plaintext
Executable File
15 lines
468 B
Plaintext
Executable File
# ><[0]
|
|
echo Ok | { sleep 0.1; read -t 0 reply; echo ">$reply<[$?]"; }
|
|
|
|
# This would not be deterministic: returns 0 "data exists" if EOF is seen
|
|
# (true terminated) - because EOF is considered to be data (read will not block),
|
|
# else returns 1 "no data".
|
|
## ><[????]
|
|
#true | { read -t 0 reply; echo ">$reply<[$?]"; }
|
|
|
|
# ><[0]
|
|
true | { sleep 0.1; read -t 0 reply; echo ">$reply<[$?]"; }
|
|
|
|
# ><[1]
|
|
sleep 0.2 | { read -p IGNORED_PROMPT -t 0 reply; echo ">$reply<[$?]"; }
|