aboutsummaryrefslogtreecommitdiff
path: root/shell
AgeCommit message (Collapse)Author
2001-05-16Move init of a bunch of globals into main so we are at leastEric Andersen
a bit more reentrant. -Erik
2001-05-15Fix the behavior of local shell variables to match that of bash and ash.Eric Andersen
-Erik
2001-05-15Oops. I left in some debug noise.Eric Andersen
2001-05-15Write set_local_var() and fixup lookup_param() so you can now useEric Andersen
shell local variables. -Erik
2001-05-15This patch covers one big part of variable handling.Eric Andersen
$ a=b foo should be handled correctly. $ a=b is parsed OK, but the actual variable setting is not yet written. Except for some weird exceptions related to quoting rules, this code passes (matches ash behavior) all the tests I threw at it. If someone now writes set_local_var(), and updates lookup_param() to match, we can claim success! - Larry
2001-05-11Fix up some silly warningsEric Andersen
2001-05-11Fix a segfault in lash, hush, and cmdedit. Each of these usedEric Andersen
xgetcwd, but did not check the return for a NULL, and then continued to call strlen on the NULL when the cwd had been removed from under it. -Erik
2001-05-11Use xgetcwdEric Andersen
2001-05-08A few more structural updates for job control.Eric Andersen
-Erik
2001-05-08Fix a stupid segfault caused by dereferencing a NULL ptr.Eric Andersen
-Erik
2001-05-07This patch from Evin Robertson <nitfol@my-deja.com> fixes export so it works.Eric Andersen
This way leaks memory, but oh well. We will probably fix that when we get around to doing local variables.
2001-05-07More hush updates from Larry:Eric Andersen
Update some comments. Generate partial placeholders for the missing builtins. Write builtin_umask. Properly treat exec without arguments as a means to open/close files within the running script. Implement "4<&-" that encodes for file descriptor closure.
2001-05-04Larry's variant on Evin Robertson's fix to what I messed upEric Andersen
trying to make job control work. This fix makes it so that hush doesn't error out when init hasn't set up job control, as in when init=/bin/sh
2001-05-04Don't reset parents context when we encounter an terminator. FixesMatt Kraai
if true; then if true; then true; fi; fi
2001-05-04If it fails to run a builtin, let it fall through toEric Andersen
exec the real thing. -Erik
2001-05-02Move up waitpid error check so that errno isn't clobbered by tcsetpgrp.Matt Kraai
2001-05-02Some more job control updates. It will now sucessfully backgroundEric Andersen
stuff. Good luck getting things back into the foreground though... -Erik
2001-05-02Don't treat newline as pipe separator when processing substitutions.Matt Kraai
2001-05-02Fix $(...) construction. Noted and patched by Larry DoolittleMatt Kraai
<ldoolitt@recycle.lbl.gov>. I'm just a patch whore. :)
2001-05-02First pass at getting job control working. This gets the infrastructureEric Andersen
in place, but something is still missing/wrong in there. Testing with 'grep foo &' seems to put _hush_ into the background. Pondering... -Erik
2001-05-02Use the current pgrp, not pid, when resetting the foreground process group.Matt Kraai
Fixes bizarre suspension when executing `echo`.
2001-05-02Don't segfault if the first word is the empty string.Matt Kraai
2001-05-02Another update from Larry:Eric Andersen
Makes hush return code equal to that of the last command executed. Fixes the mode where input comes from a file.
2001-05-01Another hush update from Larry:Eric Andersen
Minor improvements. Something is still broken with running scripts via "hush filename". All the following are now handled acceptably (matches ash, not bash). if true; then echo foo1; fi if true; then echo foo2; fi if true; false; then echo bar; else echo foo3; fi if true || false; then echo foo4; fi - Larry
2001-04-30Some more hush.c updates from Larry Doolittle.Eric Andersen
2001-04-27Use BUFSIZ for the_command to match size used in cmdeditEric Andersen
2001-04-27An update to hush from Larry:Eric Andersen
It should recover more smoothly from syntax errors, and it now has a decent guess when the reserved word construct is over (or not) to control execution and prompting. I took out all the redundant standalone test copies of libbb routines, but left in a hook so I can include those for my testing. I'll post that include file on my web site. - Larry
2001-04-26This is the initial checkin of Larry Doolittle's hush.c, using hisEric Andersen
April 25, 2001 snapshot, adjusted a bit by me so it has cmdedit support. This checkin also removes sh.c. In the future sh.c will be a symlink to your shell of choice. For now, this symlink will default to pointing to lash.c (as in the past). If you change the symlink to point to hush.c, then thats what you will get. This symlink business is a temporary situation, which will be cleaned up Real Soon Now(tm). -Erik
2001-04-25Moved some #ifdefs down below #include "busybox.h" where they belong.Mark Whitley
2001-04-23Some patches from Gennady Feldman. Fixed a glob problem such thatEric Andersen
'ls *.h Config.h' works. Fixed a silly typo with fg/bg process control. Made cmdedit exit sanely when it cannot read input.
2001-04-12Another banner consolidation from Larry Doolittle <ldoolitt@recycle.lbl.gov>.Matt Kraai
2001-04-12Fix handling of '' and "".Matt Kraai
2001-04-09Apply Vladimir's latest cleanup patch.Eric Andersen
-Erik
2001-04-05Add support of /W promptsEric Andersen
-Erik
2001-04-04Avoid segfault when export is invoked with no arguments. Thanks toMatt Kraai
Gennady Feldman.
2001-03-29Add in a new standalone env applet for fixing up app's environmentsEric Andersen
-Erik
2001-03-27Fix to last patch: locale code should be 9, not 7.Mark Whitley
2001-03-27Applied patch from Vladimir N. Oleynik to add locale support to the shell perMark Whitley
bug report from Ralph Jones.
2001-03-23-Wshadow sh fix from Jeff GarzikEric Andersen
2001-03-21A nice patch from Larry Doolittle that adds -Wshadow andEric Andersen
cleans up most of the now-revealed problems.
2001-03-19Another cleanup patch from Jeff Garzik <jgarzik@mandrakesoft.com>Eric Andersen
2001-03-19Fix to cmdedit.c from VladimirEric Andersen
2001-03-17Patch from Larry and Vladimir to clean up sh.c and fixEric Andersen
shell expansion to work in non POSIX locales.
2001-03-15Fix from Larry for glob problems.Eric Andersen
-Erik
2001-03-15cmdedit.c bugfix patch from Vladimir.Eric Andersen
-Erik
2001-03-15Reversed previous patch. The right way is to fix uClibc.Mark Whitley
2001-03-15Applied patch from Andreas Neuhaus to fix namespace conflict that made busyboxMark Whitley
not compile with uClibc.
2001-03-14Yesterday I make strsep_space include post-token whitespace,Eric Andersen
so we should not be adding another " " between tokens. -Erik
2001-03-14I forgot to malloc space for the NULL.Eric Andersen
-Erik
2001-03-14Applied patch from Larry Doolittle to fix '>\na\n' bug. Should close bug #1132Mark Whitley