summaryrefslogtreecommitdiff
path: root/shell (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix CONFIG_ASH_MATH_SUPPORT_64 so it actually worksEric Andersen2004-10-081-4/+4
|
* Hiroshi Ito writes:Eric Andersen2004-10-081-0/+1
| | | | | | | | ash "unset OLDPWD; cd -" causes segmentation fault. ( OLDPWD is not set when sh is invoked from getty. ) patch against current CVS is attached.
* egor duda writes:Eric Andersen2004-10-082-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | Hi! I've created a patch to busybox' build system to allow building it in separate tree in a manner similar to kbuild from kernel version 2.6. That is, one runs command like 'make O=/build/some/where/for/specific/target/and/options' and everything is built in this exact directory, provided that it exists. I understand that applyingc such invasive changes during 'release candidates' stage of development is at best unwise. So, i'm currently asking for comments about this patch, starting from whether such thing is needed at all to whether it coded properly. 'make check' should work now, and one make creates Makefile in build directory, so one can run 'make' in build directory after that. One possible caveat is that if we build in some directory other than source one, the source directory should be 'distclean'ed first. egor
* Fix a typoGlenn L McGrath2004-09-241-2/+2
|
* A bit of extra explanation regarding STANDALONEEric Andersen2004-09-241-0/+5
|
* Patrick Huesmann noticed BusyBox would not link whenEric Andersen2004-09-081-0/+2
| | | | | | | | | | | | | | CONFIG_FEATURE_COMMAND_EDITING was defined *and* CONFIG_FEATURE_COMMAND_TAB_COMPLETION was undefined. Vladimir N. Oleynik writes: Its declare always, also if CONFIG_FEATURE_COMMAND_TAB_COMPLETION undefined. Patch to CVS version attached. --w vodz
* Jonas Holmberg from axis dot com writes:Eric Andersen2004-09-021-22/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes msh handle variable expansion within backticks more correctly. Current behaviour (wrong): -------------------------- BusyBox v1.00-rc3 (2004.08.26-11:51+0000) Built-in shell (msh) Enter 'help' for a list of built-in commands. $ A='`echo hello`' $ echo $A `echo hello` $ echo `echo $A` hello $ New behaviour (correct): ------------------------ BusyBox v1.00-rc3 (2004.08.26-11:51+0000) Built-in shell (msh) Enter 'help' for a list of built-in commands. $ A='`echo hello`' $ echo $A `echo hello` $ echo `echo $A` `echo hello` $ The current behaviour (wrong according to standards) was actually my fault. msh handles backticks by executing a subshell (which makes it work on MMU-less systems). Executing a subshell makes it hard to only expand variables once in the parent. Therefore I export all variables that will be expanded within the backticks and let the subshell handle the expansion instead. The bug was found while searching for security leaks in CGI-scripts. Current behaviour of msh makes it easy to expand backticks by mistake in $QUERY_STRING. I recommend appling the patch before release of bb 1.00. /Jonas
* Quiet a few warningsEric Andersen2004-08-271-19/+1
|
* Patch from Vladimir N. Oleynik:Eric Andersen2004-08-192-1/+2
| | | | | | | | | | | | | | | | On Wed Aug 18, 2004 at 06:52:57PM +0800, Matt Johnston wrote: > I've come across some strange-seeming behaviour when running programs > under Busybox (1.0.0-rc3) ash. If the child process sets stdin to be > non-blocking and then exits, the parent ash will also exit. A quick strace > shows that a subsequent read() from stdin returns EAGAIN (as would be > expected): Thanks! Patch attached. --w vodz
* Joe.C writes:Eric Andersen2004-08-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This bug is in busybox 1.0.0-rc2. When using lash exec builtin with redirection, the opened file fd keep increasing. For example, please try the following command with lash. ls -al /proc/<lash pid>/fd exec /bin/sh 2>/dev/null ls -al /proc/<lash pid>/fd The last 'ls' command output will look like this. The fd number 4 shouldn't exist. lrwx------ 1 501 100 64 Aug 13 13:56 4 -> /dev/pts/5 l-wx------ 1 501 100 64 Aug 13 13:56 2 -> /dev/null lrwx------ 1 501 100 64 Aug 13 13:56 1 -> /dev/pts/5 lrwx------ 1 501 100 64 Aug 13 13:56 0 -> /dev/pts/5 dr-xr-xr-x 3 501 100 0 Aug 13 13:56 .. dr-x------ 2 501 100 0 Aug 13 13:56 . This one-line patch fix this problem by setting CLOEXEC flag for squirrel fd. Please apply. Joe.C
* Patch from Tito to fix warnings about redifined functionions barrier and likely.Glenn L McGrath2004-08-061-9/+9
|
* Michael Leibow, MichaelLe at belkin.com writes:Eric Andersen2004-08-041-375/+1056
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A question was posted a month ago by Mark Alamo to see if others had problems with sourcing subscripts within msh. We asked his firm to fix the msh.c bug he described because we didn't have enough time to do it ourselves. When msh.c is executing a compound statement and there is a . command to source another script file, msh.c will not execute the subscript until it's completed executing the rest of the compound statement. His example was this: Echo "Start" ; . ./subA; echo "mid" ; . ./subB ; echo "end" subA and subB execute AFTER end is printed in reverse order. The same is true if the sourced files are inside an if else fi, case esac, or any compound statement. Attached is a patch to msh.c. It fixes the problem. Cd to the root of your busybox tree and execute "patch -p1 < msh.c.patch" Unfortunately, I won't have more time to work on this so I hope that there aren't any problems! Michael Leibow Senior Software Engineer Belkin Corporation
* Run msh through indentEric Andersen2004-08-041-1313/+1164
|
* Paul Whittaker writes:Eric Andersen2004-07-241-0/+1
| | | | | | | | | | | | | With job control enabled, ash fails to tcsetpgrp back to initialpgrp upon exit. exitshell() should call setjobctl(0) to do this. Context: I am using a lightweight menu system (replimenu[.sf.net]) on my console, which invokes "/bin/sh -i -c /bin/login", where /bin/sh and /bin/login are busybox applets. /bin/sh is ash, with CONFIG_ASH_JOB_CONTROL=y as the sole suboption. The shell of the user concerned (nobody) is also /bin/sh (ash). When the user /bin/sh exits (and thereby login and its parent sh), replimenu receives EIO when it tries to read from the terminal.
* Patch from Jean Wolter, fixes compiler warning when ASH_ALIAS isGlenn L McGrath2004-07-211-27/+27
| | | | disabled.
* Fix compile error when math support disabled.Glenn L McGrath2004-06-251-1/+2
|
* Stupidity-1, Erik-0Eric Andersen2004-06-221-1/+1
|
* Bastian Blank notices a couple of int64_ts that should haveEric Andersen2004-06-221-2/+1
| | | | been longs
* Patch from Bastian Blank:Eric Andersen2004-06-222-12/+31
| | | | | | | | | | | | The updated patch adds a config option to explicitely enable 64 bit arithmetic. Also it removes the arith prototype from libbb.h as it is not used outside of ash. Bastian this patch has been slightly modified by Erik for cleanliness.
* Larry Doolittle writes:Eric Andersen2004-04-144-19/+19
| | | | | | | | | | | | | | | | | | | | | | This is a bulk spelling fix patch against busybox-1.00-pre10. If anyone gets a corrupted copy (and cares), let me know and I will make alternate arrangements. Erik - please apply. Authors - please check that I didn't corrupt any meaning. Package importers - see if any of these changes should be passed to the upstream authors. I glossed over lots of sloppy capitalizations, missing apostrophes, mixed American/British spellings, and German-style compound words. What is "pretect redefined for test" in cmdedit.c? Good luck on the 1.00 release! - Larry
* Wolfgang Denk writes:Eric Andersen2004-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | He, there is a bug in HUSH's handling of "if" / "elif" commands: $ if true > then > echo 1 > elif > true > then > echo 2 > elif > true > then > echo 3 > else > echo 4 > fi 1 2 3 $ The same bug exists in all versions of HUSH from BB v0.60.x up to and including v1.00-pre9. The attached patch fixes this: $ if true > then > echo 1 > elif > true > then > echo 2 > elif > true > then > echo 3 > else > echo 4 > fi 1 $ Best regards, Wolfgang Denk
* Peter Milne writes:Eric Andersen2004-04-121-3/+22
| | | | | | | | | | | | | | | | Just upgraded from 0.6 to 1.00-pre8 Dot command handling handled args correctly (same as bash) in 0.60, but failed in 1.00: I fixed this by reverting the dotcmd function back to previous 0.60 instantiation, please consider using the older version. Thanks Peter
* Jamie Guinan writes:Eric Andersen2004-04-122-3/+3
| | | | | | | | | | | It looks like latest uClibc defines ARCH_HAS_MMU, but a few busybox files test UCLIBC_HAS_MMU, resulting in vfork() getting called instead of fork(), etc. Patch below. Only tested for lash. Cheers, -Jamie
* Fix spelling. "sort of" is two words.Eric Andersen2004-04-121-1/+1
|
* Remove the CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN option. It was sortofEric Andersen2004-04-075-40/+8
| | | | stupid and didn't work properly anyways.
* Per suggestion by Pawel Sakowski, fix the dash_arith() prototypeEric Andersen2004-04-051-2/+2
| | | | to return a long. We were needlessly truncating to an int.
* s/fileno\(stdin\)/STDIN_FILENO/gEric Andersen2004-03-273-3/+3
| | | | s/fileno\(stdout\)/STDOUT_FILENO/g
* Patch from vodz to fix the dynamic vars patch, which I should notEric Andersen2004-03-162-75/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | have checked in. Vladimir writes: Your patch have many problem. 1. You always added + time(). This cannot reset RANDOM=value for debuging with replay sequential. 2. Hmm. I examine bash 2.04 source. This pseudorandom generator use low bits of counter value. You use high bits. This make bad pseudorandom values after have 0-value. For example, if + time() do remove, your generator always return 0 after first generate 0. 3. Memory leak per call. Use ash-unlike unecessary bb_strdup function. 4. Unsupport show last $RANDOM value for "set" and "export" command. 5. Bloat code. Busybox-unlike patch - added unstandart feature as default hardcode. Last patch attached. Erik, why you apply Paul patch with have 5-th point problem? :( Last patch have ash change xwrite() to fresh libbb/bb_full_write interfase (haved loop after EINTR). --w vodz
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-157-90/+90
|
* Fix some goofy formattingEric Andersen2004-03-121-4/+3
|
* Paul Mundt, lethal at linux-sh dot org writes:Eric Andersen2004-03-111-14/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here's a follow-up replacement to the patch I sent earlier, this adjusts some of the semantics of the dynamic variable setting. Namely, dynamic vars can hook a set handler (which RANDOM uses to adjust the seed). They'll only lose their dynamic status if they're unset. I've used the same approach that bash does to come up with the random number, mostly just for consistency. For example: $ echo $RANDOM 13759 $ echo $RANDOM 20057 $ echo $RANDOM 1502 $ export RANDOM=42 $ echo $RANDOM 24179 $ echo $RANDOM 2046 $ unset RANDOM $ echo $RANDOM $ export RANDOM=42 $ echo $RANDOM 42 $
* Patch by Felipe Kellermann to fix a compiler compatability problemGlenn L McGrath2004-03-051-6/+6
|
* Vodz. last_patch_128Glenn L McGrath2004-02-221-6/+8
| | | | | | | - declare applet_using as static from applets.c - small correction to cmdedit, previous version cleared history after Ctrl-C - small spelling correction (by Friedrich Lobenstock)
* Fix vstype[] to match VS* defines. Patch from OpenWrt by mbm.Manuel Novoa III2004-02-181-1/+1
|
* oops. Leave the default feature set enbled for now...Eric Andersen2004-02-101-2/+2
|
* Initial effort at disabling job control as wellEric Andersen2004-02-101-6/+35
|
* Support disabling pipe and redirect supportEric Andersen2004-02-101-40/+67
|
* Patch from vodz, based on bug report from Richard Kojedzinszky:Eric Andersen2004-02-061-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Richard, >I have a problem, which I can reproduce now. I am using pre7 version of >busybox, and the tab completion works fine. I mean, with an empty command >line I press the TAB twice, and ash shows me the available commands. But >when i process the profile file below, as > $ . /etc/profile >then it stops working, and the double-tab lists the directories available >from the cwd, and not the commands. Has someone else meet this problem >before, or am i doing something wrong? > >This is my '/etc/profile': >- --- ># System profile > >PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin >export PATH >trap ":" INT QUIT TERM > >export PS1="\h \w # " Thanks. Patch attached. --w vodz
* Vodz last_patch_125_2, this patch have: Glenn L McGrath2004-02-042-15/+66
| | | | | | | - synced with dash 0.4.21 - better handle trap "cmds..." SIGINT (strange, i make bad hack for ash and cmdedit, but this work only with this...) - may be haven`t problem with Ctrl-D
* Fix compile error when tab completion disabledGlenn L McGrath2004-01-251-1/+1
|
* last_patch_124 from Vodz, fix an ash bug when alt-1 was pressed, debianGlenn L McGrath2004-01-221-12/+11
| | | | bug #228915
* Vodz last_patch_122, Check $PATH at runtime to fix tab completionGlenn L McGrath2004-01-143-3/+18
|
* Vodz last_patch_121, syncing with dash_0.4.19, reduce code size.Glenn L McGrath2004-01-131-162/+127
|
* Declare dependencies of command line editing in the build systemGlenn L McGrath2004-01-032-45/+34
|
* Cmdedit update from Vladimir N. Oleynik (vodz)Eric Andersen2003-12-231-22/+24
|
* Fix for "Broken pipe" issue, vodz last_patch116_3Glenn L McGrath2003-11-251-1/+1
|
* Fix a "broken pipe" problem. vodz, last_patch_116-2Glenn L McGrath2003-11-141-5/+1
|
* last_patch116 from vodz:Eric Andersen2003-10-221-10/+18
| | | | | | | | | | | | | | | | | | | | | | | Stephane, >Using busybox+uclibc, crond syslog messages look like: > >Oct 9 09:04:46 soekris cron.notice crond[347]: ^Icrond 2.3.2 dillon, >started, log level 8 Thanks for testing. >The attached patch corrects the problem. Your patch is not correct. Correct patch attached. Also. Last patch have - add "Broken pipe" message to ash.c - busybox ash synced with dash_0.4.18 --w vodz
* Andreas Mohr writes:Eric Andersen2003-10-221-8/+9
| | | | | | | | | | | the busybox menuconfig triggered my "inacceptable number of spelling mistakes" upper level, so I decided to make a patch ;-) I also improved some wording to describe some things in a better way. Many thanks for an incredible piece of software! Andreas Mohr, random OSS developer
* Patch by Junio C Hamano to workaround a gcc compiler bug.Glenn L McGrath2003-09-171-22/+23
| | | | | | | | | | | | | | | | | | | The construct certain vintages of GCC (the one I have trouble with is 3.2.3) have trouble with looks like the following: static struct st a; static struct st *p = &a; struct st { int foo; }; static void init(void) { a.foo = 0; } The problem disappears if we move the struct declaration up to let the compiler know the shape of the struct before the first definition uses it, like this: struct st { int foo; }; /* this has been moved up */ static struct st a; static struct st *p = &a; static void init(void) { a.foo = 0; }