aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * ash: fix execution of shell scripts without shebangDenys Vlasenko2011-03-071-10/+19
| | | | | | | | | | | | We were assuming #!/bin/sh, whereas we had to simply re-enter ash. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * convert "do {...} while (1);" -> "while (1) {...}"Denys Vlasenko2011-03-021-8/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit 'da4441c44f6efccb6f7b7588404d9c6bfb7b6af8' into mergeRon Yorston2012-03-221-30/+92
|\| | | | | | | | | | | | | Conflicts: libbb/vfork_daemon_rexec.c networking/wget.c procps/ps.c
| * ash: fix ash-signals/signal8 testcase failureDenys Vlasenko2011-02-211-12/+46
| | | | | | | | | | | | | | | | | | | | | | 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>
| * hush: do not print killer signal's name for SIGPIPEDenys Vlasenko2011-02-141-0/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix TMOUT not restoring tty attributesDenys Vlasenko2011-02-081-46/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * ash: optional support for $TMOUT variableDenys Vlasenko2011-02-041-0/+47
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: cosmetic cleanupsDenys Vlasenko2011-02-041-13/+12
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit '8d0e0cdadf726beab28ccdc7d69738c1534e1f74' into mergeRon Yorston2012-03-211-3/+5
|\| | | | | | | | | | | | | Conflicts: include/platform.h libbb/Kbuild.src libbb/messages.c
| * move utmp.h include to libbb.hDenys Vlasenko2011-01-251-0/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * mass removal of underscores from _BB_DIR_foo and _BB_SUID_fooDenys Vlasenko2011-01-181-3/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Eat trailing CRs as well as LFs when expanding backquotesRon Yorston2012-02-161-1/+2
| |
* | Replace backslash with forward slash in environmentRon Yorston2012-02-161-0/+7
| |
* | Implement nonblocking waitRon Yorston2012-02-141-3/+4
| |
* | Create fake HOME environment variableRon Yorston2012-02-091-0/+19
| |
* | win32: ash: teach "cd" DOS path separator '\'Nguyễn Thái Ngọc Duy2011-01-141-7/+8
| | | | | | | | | | | | docd() is rewritten to deal with DOS paths. Surprisingly, I did not consider '\' as path separator, only '/'. Teach it to see '\' just like '/'. Should fix github issue 3.
* | Merge remote-tracking branch 'upstream/master'Nguyễn Thái Ngọc Duy2011-01-041-2/+9
|\|
| * init: simpler handling of leading dash in commandsDenys Vlasenko2010-12-251-1/+1
| | | | | | | | | | | | | | function old new delta init_exec 233 219 -14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fixes for bugs discovered by randomconfig builds and testsDenys Vlasenko2010-11-221-1/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit 'e4dcba1c103dc28e927e004791e331aaf604383d'Nguyễn Thái Ngọc Duy2011-01-041-2/+2
|\| | | | | | | | | Conflicts: libbb/make_directory.c
| * *: whitespace fixesDenys Vlasenko2010-10-281-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit '06f719fd79fe15ce6fd5431bc58fcb22851de24d^'Nguyễn Thái Ngọc Duy2011-01-041-23/+22
|\|
| * *: whitespace fixesDenys Vlasenko2010-10-051-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix signal and "set -e" interactionDenys Vlasenko2010-09-251-6/+13
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shell/math: deconvolute and explain ?: handling. Give better error messageDenys Vlasenko2010-09-161-1/+1
| | | | | | | | | | | | | | function old new delta arith_apply 1271 1283 +12 Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
| * shell/math: return string error indicator, not integerDenys Vlasenko2010-09-151-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta expand_and_evaluate_arith 87 106 +19 expand_one_var 1563 1570 +7 arith 12 18 +6 evaluate_string 678 680 +2 arith_apply 1269 1271 +2 builtin_umask 133 132 -1 ash_arith 118 75 -43 expand_vars_to_list 1094 1038 -56 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/3 up/down: 36/-100) Total: -64 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
| * shell/math.c: rename arith_eval_hooks to arith_state, put error code into itDenys Vlasenko2010-09-131-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta expand_and_evaluate_arith 79 89 +10 arith 675 674 -1 arith_lookup_val 151 142 -9 ash_arith 135 122 -13 arith_apply 1304 1269 -35 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/4 up/down: 10/-58) Total: -48 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* | win32: ash: fix path_advance() not advancing correctlyNguyễn Thái Ngọc Duy2011-01-041-1/+10
| | | | | | | | | | | | | | | | | | *p can be either ':' or ';' at the end of path_advance(). However the code expects it to be ':' only. This effectively skips the rest of $PATH after the first component when Windows' $PATH is used. This should fix Github#1. While at it, also fix pathopt code expecting ':' only (again).
* | win32: ash: implement ^C (and Ctrl+Break)Nguyễn Thái Ngọc Duy2010-09-231-0/+25
| | | | | | | | ^C sometimes does not work while Ctrl+Break seems to always work
* | win32: ash: make waitpid return early if there is no childNguyễn Thái Ngọc Duy2010-09-221-0/+2
| |
* | Merge remote branch 'origin/master'Nguyễn Thái Ngọc Duy2010-09-141-199/+189
|\|
| * ash: shrink by folding an if check into setprompt; unindent big blockDenys Vlasenko2010-09-121-166/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta setprompt_if - 66 +66 parseheredoc 126 124 -2 parsecmd 68 66 -2 redirect 1254 1249 -5 xxreadtoken 351 343 -8 readtoken1 3219 3204 -15 setprompt 62 - -62 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/5 up/down: 66/-94) Total: -28 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
| * ash: add missing casts to match CTLfoo; add TODO commentsDenys Vlasenko2010-09-121-8/+12
| | | | | | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
| * Avoid side effects in putc(), which may be implemented as a macroDan Fandrich2010-09-091-3/+6
| | | | | | | | | | Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
| * shell: unify endofname() in hush and ashDenys Vlasenko2010-09-071-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta builtin_umask 132 133 +1 changepath 195 194 -1 expand_and_evaluate_arith 77 69 -8 ash_arith 143 135 -8 expand_one_var 1551 1515 -36 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/4 up/down: 1/-53) Total: -52 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
| * hush: remove disabled CMD_SINGLEWORD_NOGLOB_COND, rename o_glob->perform_globDenys Vlasenko2010-09-061-1/+1
| | | | | | | | | | | | + other small tweaks to comments and such Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* | Merge branch 'origin/master' (early part)Nguyễn Thái Ngọc Duy2010-09-141-12/+13
|\|
| * libbb: add xfstat functionDenys Vlasenko2010-08-311-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta xfstat - 25 +25 mkfs_ext2_main 2421 2423 +2 mkfs_reiser_main 1197 1194 -3 next 312 307 -5 ar_main 533 522 -11 mkfs_minix_main 2938 2924 -14 mkfs_vfat_main 1511 1495 -16 writeTarFile 272 255 -17 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/6 up/down: 27/-66) Total: -39 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
| * ash: small code shrink (-21 bytes)Denys Vlasenko2010-08-301-9/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
| * *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | | | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'origin/master' (early part)Nguyễn Thái Ngọc Duy2010-09-141-68/+40
|\|
| * ash: fix another bit of var_bash4 bugDenys Vlasenko2010-08-071-3/+14
| | | | | | | | | | | | | | | | | | | | But it _still_ doesn't pass! quoted case is a tough nut to crack function old new delta redirect 1281 1286 +5 subevalvar 1141 1142 +1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: cosmetic fixes, no code changesDenys Vlasenko2010-08-071-60/+21
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix another bug detected by var_bash4.testsDenys Vlasenko2010-08-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... but var_bash4.tests still does not pass! function old new delta expandarg 959 962 +3 localcmd 259 257 -2 readtoken1 3275 3260 -15 subevalvar 1178 1141 -37 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: 3/-54) Total: -51 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix dequoting error detected by var_bash4 testDenys Vlasenko2010-08-061-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | But the test still fails (one more bug to fix) function old new delta changepath 195 192 -3 readtoken1 3247 3240 -7 subevalvar 1204 1184 -20 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-30) Total: -30 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'origin/master' (early part)Nguyễn Thái Ngọc Duy2010-09-141-33/+54
|\|
| * ash: add a testcase for bug 2281 (currently fails). Small code cleanups.Denys Vlasenko2010-08-051-31/+52
| | | | | | | | | | | | | | | | | | | | | | function old new delta changepath 195 192 -3 subevalvar 1204 1200 -4 readtoken1 3247 3240 -7 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-14) Total: -14 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: mass cosmetic removal of extra empty lines. no code changesDenys Vlasenko2010-07-261-2/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix $! value when traps are setAlexander Shishkin2010-07-251-0/+1
| | | | | | | | | | Signed-off-by: Alexander Shishkin <virtuoso@slind.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cttyhack: move build system bits into cttyhack.c, no code changesDenys Vlasenko2010-07-161-0/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>