aboutsummaryrefslogtreecommitdiff
path: root/shell (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | mingw: dummy implementation of times/sysconfRon Yorston2014-01-301-9/+0
| |
* | ash: reset pointers to builtin environment variables after forkRon Yorston2014-01-141-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The builtin environment variables can be accessed using macros that reference the varinit array. initvar puts pointers to varinit into the variable hash table. During forkshell_prepare two copies of the builtin variables are made: once as the varinit array and again through the pointers in the hash table. One of these copies is accessed by code that uses the macros and the other by code that looks up the variable by name. This is the cause of the strange behaviour of IFS in backticks: https://github.com/pclouds/busybox-w32/issues/12 To avoid the problem the pointers in the hash table are reset to the varinit array in forkshell_init. It seemed easier to do it this way than to try and prevent the duplicate copies being made in the first place.
* | ash: revert initialisation of SHLVL: fixed upstreamRon Yorston2014-01-131-4/+0
| |
* | Merge branch 'busybox' into mergeRon Yorston2014-01-131-1/+1
|\| | | | | | | | | | | Conflicts: include/platform.h scripts/basic/fixdep.c
| * ash: in bash compat mode, always export $SHLVLDenys Vlasenko2014-01-071-1/+1
| | | | | | | | | | | | | | function old new delta ash_main 1437 1442 +5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | ash: don't copy localvars list during forkshellRon Yorston2014-01-131-23/+2
| | | | | | | | | | | | The localvars linked list is only required to tidy up local variables when a shell function returns. There's no point in copying it to a child process.
* | shell: add \r to IFSRon Yorston2014-01-121-0/+4
| | | | | | | | | | | | When commands run in backquotes generated multiple lines of output the carriage returns weren't being removed. Adding \r to IFS fixes this.
* | ash: prevent null-pointer exception with local variablesRon Yorston2014-01-101-1/+1
| | | | | | | | | | | | A local variable can have a null text pointer: if so, don't call strlen. localvar_copy handles this correctly because nodeckstrdup doesn't try to copy from the null pointer.
* | ash: drop unnecessary change from upstream BusyBoxRon Yorston2014-01-081-2/+0
| |
* | Make dummy resource.hRon Yorston2014-01-061-2/+0
| |
* | Make dummy paths.hRon Yorston2014-01-051-2/+0
| |
* | Initialise SHLVL when shell is first startedRon Yorston2014-01-021-0/+4
| |
* | Merge branch 'busybox' into mergeRon Yorston2014-01-022-10/+12
|\| | | | | | | | | | | Conflicts: archival/Config.src shell/ash.c
| * hush: typo fixes in commentsDenys Vlasenko2013-11-281-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: Set SHLVL in ASH_BASH_COMPATBernhard Reutner-Fischer2013-11-081-1/+4
| | | | | | | | | | | | | | | | | | | | function old new delta ash_main 1456 1505 +49 .rodata 148488 148494 +6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 55/0) Total: 55 bytes Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * ash: Use setvar2 some moreBernhard Reutner-Fischer2013-11-081-7/+6
| | | | | | | | | | | | (add/remove: 0/0 grow/shrink: 10/15 up/down: 13/-27) Total: -14 bytes Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | Merge branch 'busybox' into mergeRon Yorston2013-08-275-14/+57
|\|
| * typo fix in commentDenys Vlasenko2013-07-141-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * typo fix in commentDenys Vlasenko2013-07-081-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unicode: check $LC_CTYPE too to detect Unicode modeDenys Vlasenko2013-07-052-0/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unicode: check $LC_ALL to detect Unicode mode, not only $LANGDenys Vlasenko2013-07-022-2/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: fix build failure if FEATURE_EDITING=y && !HUSH_INTERACTIVEDenys Vlasenko2013-05-121-3/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash,hush: history builtinFlemming Madsen2013-04-072-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta show_history - 39 +39 builtin_history - 16 +16 historycmd - 13 +13 bltins1 312 324 +12 builtintab 336 344 +8 popstring 134 140 +6 hush_main 1048 1046 -2 ash_main 1398 1396 -2 size_from_HISTFILESIZE 44 40 -4 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 3/3 up/down: 94/-8) Total: 86 bytes Signed-off-by: Flemming Madsen <busybox@themadsens.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: fix for "while false && true; do echo BUG; break; done". closes 6170Denys Vlasenko2013-04-073-10/+16
| | | | | | | | | | | | | | function old new delta run_list 959 941 -18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | ash: add noconsole option to hide console window on WIN32Ron Yorston2013-05-241-0/+15
| | | | | | | | | | | | When a shell script is spawned from a GUI application a console window is displayed. If the noconsole option is set the console window is hidden.
* | ash: Add a very small timeout to nonblocking waitRon Yorston2013-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | A nonblocking waitpid was implemented using WaitForMultipleObjects with a timeout of 0. This was to fix an issue where builtin commands in a foreground shell were blocked while a background command was running. However, this caused the shell to consume 100% CPU. A workaround seems to be to use a very small (1ms) timeout.
* | sh: only change to user's home directory in login modeRon Yorston2013-04-041-1/+7
| |
* | ash: remove old commentRon Yorston2013-03-261-2/+0
| |
* | Merge branch 'busybox' into mergeRon Yorston2013-03-196-54/+45
|\|
| * ash: add comment about failures in source builtin. No code changes.Denys Vlasenko2013-03-171-0/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: source builtin should override $N only if it has argsDenys Vlasenko2013-03-173-2/+19
| | | | | | | | | | | | | | function old new delta builtin_source 174 184 +10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: read $HOME/.profile instead of $(pwd)/.profileStefan Hellermann2013-03-151-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | ash --login should read ~/.profile instead of .profile in the current directory. I noticed it while trying to figure out why /root/.profile is only read sometimes. function old new delta ash_main 1374 1398 +24 Signed-off-by: Stefan Hellermann <stefan@the2masters.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: move code to allow setting $HOME in /etc/profileStefan Hellermann2013-03-151-13/+9
| | | | | | | | | | | | | | | | | | | | move HISTFILE=$HOME/.ash_history below reading /etc/profile, so that /etc/profile can set $HOME. HOME can be unset when directly invoking ash --login from init without going through getty. Signed-off-by: Stefan Hellermann <stefan@the2masters.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * move endofname() to libbbDenys Vlasenko2013-02-263-38/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2013-02-073-7/+18
|\|
| * ash: revert wrong "fix" for an apparent memory leak. Closes 5822Denys Vlasenko2013-01-171-0/+9
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * whitespace fixes. no code changesDenys Vlasenko2013-01-151-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * whitespace cleanup. no code changesDenys Vlasenko2013-01-143-6/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2012-12-111-0/+2
|\|
| * ash: fix a memory leakJon Tollefson2012-11-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The script which triggers the leak: while true do while true do break; done</dev/null done Signed-off-by: Jon Tollefson <kniht@linux.vnet.ibm.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2012-10-101-9/+32
|\|
| * ash: implement export -nDenys Vlasenko2012-10-011-4/+26
| | | | | | | | | | | | | | function old new delta exportcmd 129 175 +46 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: trivial fixes for compile failuresDenys Vlasenko2012-09-251-5/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2012-09-075-18/+46
|\| | | | | | | | | | | Conflicts: include/libbb.h shell/ash.c
| * ash: fix "read -s" + ^C. Closes 5504Denys Vlasenko2012-09-062-1/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: declare strings with ALIGN1, as appropriateMichael Tokarev2012-07-241-1/+1
| | | | | | | | | | Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: add a comment about VEXPORTDenys Vlasenko2012-07-071-0/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * include sys/resource.h where neededMike Frysinger2012-07-051-0/+1
| | | | | | | | | | | | | | | | We use functions from sys/resource.h in misc applets, but don't include the header. This breaks building with newer glibc versions, so add the include where needed. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * ash: fix a bug in >${varexp} handling. Closes 5282Denys Vlasenko2012-06-093-10/+26
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2012-04-291-4/+0
|\|