| Summary: | hush: no readonly for globals | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Denis.Ryndine |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED INVALID | ||
| Severity: | minor | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
hush does not have "readonly" builtin. "local readonly MYSLEEP=1" would declare a local variable named "readonly", and another variable named "MYSLEEP". |
BusyBox v1.20.2 (2013-04-04 13:18:53 UTC) hush - the humble shell The frist two below won't 'compile', the third one with local readonly is ok. readonly MYSLEEP=1 mysleep() { sleep $MYSLEEP } mysleep mysleep() { readonly MYSLEEP=1 sleep $MYSLEEP } mysleep #won't mind local mysleep() { local readonly MYSLEEP=1 sleep $MYSLEEP } mysleep