| Summary: | HUSH: read does not use more than one argument | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Mikel Garai <m.garai> |
| Component: | Standard Compliance | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.15.x | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
| Attachments: | patch to add multiple argument to builtin read of HUSH | ||
I propose adapting and reusing (sharing) ash's readcmd() code. It is a bit more work, but ash's read is well debugged and supports options like timeouts, max chars and so on. Fixed in 1.16.0 |
Created attachment 901 [details] patch to add multiple argument to builtin read of HUSH The hush's builtin read does not accept more than one argument, I just did a patch to enable this feature (attached here). There are some limitations in this patch: 1) it ignores escape sequences 2) it does not use $IFS (I first use the global variable G.ifs but i did have issues in blackfin architecture with the simple command "echo a | read a" and similars that raised a NULL pointer error) This patch also fixes a bug of builtin read that did not return >0 when stdin was closed, for using read in commands of type "cat XXX | ( while read a b ; do ... ; done )"