aboutsummaryrefslogtreecommitdiff
path: root/shell
AgeCommit message (Collapse)Author
2011-05-09hush: add tests for interrupting readDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-09hush: code shrinkDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-08hush: make read builtin interruptible.Denys Vlasenko
function old new delta builtin_read 185 471 +286 check_and_run_traps 200 262 +62 nonblock_immune_read 73 119 +46 sigismember - 44 +44 record_signal - 21 +21 sigisemptyset - 16 +16 ... ------------------------------------------------------------------------------ (add/remove: 5/0 grow/shrink: 7/5 up/down: 483/-46) Total: 437 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-08libbb: nonblock_safe_read->nonblock_immune_read, remove unused param of ↵Denys Vlasenko
xmalloc_reads Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-08hush: fix incorrect PS2 dispaly and trap handling while reading commandDenys Vlasenko
The fix affects only !ENABLE_FEATURE_EDITING configuration Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-16ash: clear sa_flags alwaysIan Wienand
Signed-off-by: Ian Wienand <ianw@vmware.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-04ash,hush: add ulimit -e -r (RLIMIT_NICE, RLIMIT_RTPRIO)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-31ash,hush: optional support for $HISTFILESIZE.Denys Vlasenko
Based on patch from Alexey Fomenko (ext-alexey.fomenko AT nokia.com) function old new delta size_from_HISTFILESIZE - 44 +44 hush_main 998 1025 +27 ash_main 1348 1374 +26 read_line_input 3361 3372 +11 new_line_input_t 17 24 +7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-30hush: remove outdated commentsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-30hush: fix source1.testsDenys Vlasenko
function old new delta parse_and_run_stream 95 139 +44 static_get 22 25 +3 file_get 260 263 +3 builtin_umask 133 132 -1 parse_stream 2442 2425 -17 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/2 up/down: 50/-18) Total: 32 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-24hush: document a bug about aborting on sourced file error when non-interactiveDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-24hush: make parse errors in sourced file non-fatal in interactive scriptDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-24hush: fix a case where return in sourced file has no effectDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-23ash,hush: recheck LANG before every line inputDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-08ash/hush: shrink help textDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-07remove stray empty lineDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-07ash/hush: provide help textDenys Vlasenko
$ ./busybox ash --help BusyBox v1.19.0.git (2011-03-07 11:25:29 CET) multi-call binary. Usage: ash [-/+OPTCHARS] [-/+o OPTNAME]... [-c 'SCRIPT' [ARG0 [ARGS]] / SCRIPT_FILE [ARGS]] Unix shell interpreter $ ./busybox hush --help BusyBox v1.19.0.git (2011-03-07 11:25:29 CET) multi-call binary. Usage: hush [-nx] [-c 'SCRIPT' [ARG0 [ARGS]] / SCRIPT_FILE [ARGS]] Unix shell interpreter function old new delta packed_usage 28163 28212 +49 setcmd 85 78 -7 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 49/-7) Total: 42 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-07ash: fix execution of shell scripts without shebangDenys Vlasenko
We were assuming #!/bin/sh, whereas we had to simply re-enter ash. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-02convert "do {...} while (1);" -> "while (1) {...}"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-21slightly better wording in commentsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-21ash: fix ash-signals/signal8 testcase failureDenys Vlasenko
function old new delta killcmd 109 224 +115 kill_main 882 910 +28 changepath 194 195 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 144/0) Total: 144 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-14hush: do not print killer signal's name for SIGPIPEDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-08ash: fix TMOUT not restoring tty attributesDenys Vlasenko
function old new delta pgetc 420 500 +80 readtoken1 3202 3239 +37 read_line_input 3316 3337 +21 udhcpc_main 2610 2630 +20 file_get 266 272 +6 expandarg 958 963 +5 localcmd 257 259 +2 addLines 85 87 +2 read_line 94 95 +1 ed_main 2540 2541 +1 timed_out 1 - -1 lineedit_read_key 256 255 -1 alrm_sighandler 44 - -44 cmdloop 539 434 -105 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 10/2 up/down: 175/-151) Total: 24 bytes text data bss dec hex filename 887379 936 17200 905515 dd12b busybox_old 887411 936 17192 905539 dd143 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-07echo: do not retry on write errorsDenys Vlasenko
function old new delta echo_main 297 336 +39 stpcpy - 22 +22 run_pipe 1561 1566 +5 pseudo_exec_argv 187 192 +5 hush_exit 75 80 +5 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 4/0 up/down: 98/0) Total: 76 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-04ash: optional support for $TMOUT variableDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-04ash: cosmetic cleanupsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-03whitespace fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-02hush: use FEATURE_SH_NOFORK to enable NOFORK trickDenys Vlasenko
Also expands docs Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-25move utmp.h include to libbb.hDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-18hush: improve prompt in nested {}s, remove unused in_str->promptme memberDenys Vlasenko
function old new delta setup_string_in_str 29 38 +9 parse_and_run_stream 79 88 +9 setup_file_in_str 32 39 +7 parse_stream 2430 2422 -8 file_get 262 235 -27 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/2 up/down: 25/-35) Total: -10 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-18hush: fix "cmd & <newline>" problemDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-18mass removal of underscores from _BB_DIR_foo and _BB_SUID_fooDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-07hush: fix wrong prompt problem on empty interactive commantsDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-12-25init: simpler handling of leading dash in commandsDenys Vlasenko
function old new delta init_exec 233 219 -14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-21hush: fix FEATURE_CLEAN_UP code (was freeing unallocated memory)Denys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-12-18hush: fix build breakage (variable declared in for())Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-05add if guards around include <malloc.h>Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-28hush: move G_x_mode define to the more appropriate placeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-28Support set -o xtrace/noexec alternates for set -x/-nDan Fandrich
Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-28hush: display useful help textDan Fandrich
Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-22fixes for bugs discovered by randomconfig builds and testsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-22hush: fix improper handling of newline and hash chars in few corner casesDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-11-14hush: add support for "set -o pipefail"Denys Vlasenko
function old new delta checkjobs 467 517 +50 builtin_set 259 286 +27 o_opt_strings - 10 +10 hush_main 1011 1013 +2 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/0 up/down: 89/0) Total: 89 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-14hush: preparatory patch for set -o pipefail supportDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-29whitespace cleanupDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-28*: whitespace fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-05*: whitespace fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-04hush: remove "doesn't support brace expansion" from config help textDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-03hush: remove brace expansion from TODO list in comments. No code changes.Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-03hush: small code shrinkDenys Vlasenko
function old new delta expand_on_ifs 231 222 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>