[Bug 10101] New: ash read -t / --timeout does not handle 0 or fractional seconds
bugzilla at busybox.net
bugzilla at busybox.net
Mon Jul 17 19:10:51 UTC 2017
https://bugs.busybox.net/show_bug.cgi?id=10101
Bug ID: 10101
Summary: ash read -t / --timeout does not handle 0 or
fractional seconds
Product: Busybox
Version: 1.26.x
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Standard Compliance
Assignee: unassigned at busybox.net
Reporter: hudson at trmm.net
CC: busybox-cvs at busybox.net
Target Milestone: ---
The busybox ash shell builtin read does not behave like bash for 'read -t 0' or
for 'read -t x.y', which is documented as:
-t timeout
Cause read to time out and return failure if a complete line of input is not
read within timeout seconds. timeout may be a decimal number with a fractional
portion following the decimal point. This option is only effective if read is
reading input from a terminal, pipe, or other special file; it has no effect
when reading from regular files. If timeout is 0, read returns success if input
is available on the specified file descriptor, failure otherwise. The exit
status is greater than 128 if the timeout is exceeded.
In the first case, busybox read waits forever with a zero timeout rather than
returning immediately.
In the second case, the comment in busybox/shell/shell_common.c incorrectly
implies that bash does not support fractional seconds:
#if 0 /* even bash has no -t N.NNN support */
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list