On Mon, Jan 9, 2012 at 5:02 PM, Daniel Baluta <[email protected]> wrote:
> Hello,
>
> We have some problems with read command on latest busybox
> version.
>
> $ read -n 5
> 123456
>
> This command isn't returning after the fifth character. It seems
> that it is blocked in the poll call. Only after the 6th character
> is entered, the poll returns.
>
> poll([{fd=0, events=POLLIN}], 1, -1)    = 1 ([{fd=0, revents=POLLIN}])
> read(0, "1", 1)                         = 1
> poll([{fd=0, events=POLLIN}], 1, -1)    = 1 ([{fd=0, revents=POLLIN}])
> read(0, "2", 1)                         = 1
> poll([{fd=0, events=POLLIN}], 1, -1
>
>
> This is very likely to be caused by the latest patches:
> * hush: use SA_RESTARTed signal handlers across read. (10c0131a)
> * hush: make read builtin interruptible. (80542bad)

Excellent analysis!
The fix is in git now:

http://git.busybox.net/busybox/commit/?id=7ce209b9d4f6053b7e6d07dec66e382bc3614c35

-- 
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to