aboutsummaryrefslogtreecommitdiff
path: root/shell/hush.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* - move #include busybox.h to the very top so we pull in the configaldot2006-06-021-1/+2
| | | | | | | and eventual platform specific includes in early. git-svn-id: svn://busybox.net/trunk/busybox@15267 69ca8d6d-28ef-0310-b511-8ec308f3f277
* I was playing around with a dependency generator a couple weeks ago and I foundlandley2006-02-241-1/+1
| | | | | | | some #include files that aren't in the tree. No biggie... git-svn-id: svn://busybox.net/trunk/busybox@14258 69ca8d6d-28ef-0310-b511-8ec308f3f277
* moved BB_BANNER to applets/version.c file: make kernel like version, vodz2006-02-161-2/+3
| | | | | | removed depend loop: busybox.h depend with BB_BT, and all sources depend with busybox.h git-svn-id: svn://busybox.net/trunk/busybox@14080 69ca8d6d-28ef-0310-b511-8ec308f3f277
* quick analize signed->unsigned: protect overflow of map[char], getchar->EOF. ↵vodz2006-01-311-12/+12
| | | | | | Use ATTRIBUTE_UNUSE. git-svn-id: svn://busybox.net/trunk/busybox@13747 69ca8d6d-28ef-0310-b511-8ec308f3f277
* fix up yet more annoying signed/unsigned and mixed type errorsandersen2006-01-301-3/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@13732 69ca8d6d-28ef-0310-b511-8ec308f3f277
* just whitespacetimr2006-01-251-10/+10
| | | | git-svn-id: svn://busybox.net/trunk/busybox@13584 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - add platform.h.aldot2006-01-221-14/+2
| | | | | | | - use shorter boilerplate while at it. git-svn-id: svn://busybox.net/trunk/busybox@13494 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Uninitialized variable causing intermittent syntax errors (bug 449).landley2005-12-121-0/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@12842 69ca8d6d-28ef-0310-b511-8ec308f3f277
* data --> textvodz2005-10-171-7/+7
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11881 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Reduce exported from hush appletvodz2005-09-221-13/+15
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11578 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Larry Doolittle writes:andersen2004-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: svn://busybox.net/trunk/busybox@8759 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Wolfgang Denk writes: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 git-svn-id: svn://busybox.net/trunk/busybox@8747 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Jamie Guinan writes:andersen2004-04-121-2/+2
| | | | | | | | | | | | | | 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 git-svn-id: svn://busybox.net/trunk/busybox@8738 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Remove the CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN option. It was sortofandersen2004-04-071-12/+0
| | | | | | | stupid and didn't work properly anyways. git-svn-id: svn://busybox.net/trunk/busybox@8714 69ca8d6d-28ef-0310-b511-8ec308f3f277
* s/fileno\(stdin\)/STDIN_FILENO/gandersen2004-03-271-1/+1
| | | | | | | s/fileno\(stdout\)/STDOUT_FILENO/g git-svn-id: svn://busybox.net/trunk/busybox@8663 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Remove trailing whitespace. Update copyright to include 2004.andersen2004-03-151-56/+56
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8630 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Update a bunch of docs. Run a script to update my email addr.andersen2003-07-141-8/+10
| | | | git-svn-id: svn://busybox.net/trunk/busybox@7061 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Major coreutils update.mjn32003-03-191-33/+33
| | | | git-svn-id: svn://busybox.net/trunk/busybox@6751 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Make hush comple once againandersen2002-12-061-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@6116 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Change if(x)free(x); to free(x);aaronl2002-11-281-3/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@6055 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Nice patch from Wolfgang Denk <wd@denx.de> to provide hush withandersen2002-04-131-39/+308
| | | | | | | shell loops (for, while, until) and control operators (||, &&) git-svn-id: svn://busybox.net/trunk/busybox@4606 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fixup some silly prototype warningsandersen2001-10-311-3/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@3614 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Add in some (theoretical) uClinux support. Some init cleanupsandersen2001-10-281-1/+10
| | | | git-svn-id: svn://busybox.net/trunk/busybox@3596 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Major rework of the directory structure and the entire build system.andersen2001-10-241-10/+11
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@3561 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Add an option to make the shells not advertise their busybox natureandersen2001-10-191-1/+4
| | | | git-svn-id: svn://busybox.net/trunk/busybox@3548 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Allow multiple shells to be enabled.kraai2001-08-011-4/+4
| | | | git-svn-id: svn://busybox.net/trunk/busybox@3177 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from vodz:andersen2001-07-121-5/+2
| | | | | | | | | | Changed email address cmdedit API change optimizations for traceroute and md5sum added a new shared create_icmp_socket() function git-svn-id: svn://busybox.net/trunk/busybox@3078 69ca8d6d-28ef-0310-b511-8ec308f3f277
* More thrashing about trying to make hush behave itself wrt jobandersen2001-06-281-16/+18
| | | | | | | control... git-svn-id: svn://busybox.net/trunk/busybox@2934 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Explicitly call setsid()andersen2001-06-261-0/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2915 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Don't choke if /etc/profile is not availableandersen2001-06-261-8/+7
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2913 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Vladimir's last_patch_15bug12001-06-261-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2905 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix the code for establishing a controlling terminal.andersen2001-06-251-28/+42
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@2901 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Some more cleanups. Of special importance, never free a pipeandersen2001-06-221-27/+52
| | | | | | | | | that still has running jobs. Instead, we ignore it and expect it to be cleaned by the background job stuff. -Erik git-svn-id: svn://busybox.net/trunk/busybox@2886 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Some cleanups for hush. Saves about 350bytes.andersen2001-06-221-98/+67
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@2885 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Another hush update from Larry:andersen2001-06-071-14/+16
| | | | | | | | | | Fixes the interaction between if/then/else/fi syntax and variables. I planned to do it right from the beginning, but my implementation was buggy. Also adds the relevant test cases. Also adds some old Matt Kraai variable test cases that got left out somehow. git-svn-id: svn://busybox.net/trunk/busybox@2804 69ca8d6d-28ef-0310-b511-8ec308f3f277
* A patch from Larry to fix pathological things like '>""'andersen2001-06-061-5/+13
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2796 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Don't close file descriptors when we are duplicating them.kraai2001-06-051-1/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2793 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Cope gracefully when people type something, then hit ^C.andersen2001-05-311-1/+4
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@2768 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Plug another memory leakandersen2001-05-241-0/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2720 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Plug another memory leak in hush. This one showed up when backtickedandersen2001-05-231-0/+1
| | | | | | | | commands were run. This one was sure a bugger to find. -Erik git-svn-id: svn://busybox.net/trunk/busybox@2717 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix a massive memory leak in the run_list_test() function.andersen2001-05-231-33/+11
| | | | | | | | | Rename run_list_test() as free_pipe_list(). Rename run_pipe_test() as free_pipe(). -Erik git-svn-id: svn://busybox.net/trunk/busybox@2716 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Commit a patch by Larry Doolittle which fixes recursive calls to file_peek,kraai2001-05-231-7/+8
| | | | | | | and improves some debugging messages. git-svn-id: svn://busybox.net/trunk/busybox@2714 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Excellent. This patch from Larry fixes the behavior of hushandersen2001-05-221-1/+3
| | | | | | | when builtins are included in pipes. git-svn-id: svn://busybox.net/trunk/busybox@2710 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix this case. No, really this time.andersen2001-05-221-46/+61
| | | | | | | | | | | | unset FOO export FOO=bar FOO=baz echo "global env: " `env | grep ^FOO` echo "local env: " `set | grep ^FOO` -Erik git-svn-id: svn://busybox.net/trunk/busybox@2709 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix a race. Sometimes by the time we got to checkjobs(), theandersen2001-05-221-12/+27
| | | | | | | | pipe struct had already been freed. Return immediately if the pipe is NULL. git-svn-id: svn://busybox.net/trunk/busybox@2708 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Oops. Remove some debug noise I left in.andersen2001-05-221-5/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2707 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Updates from both Vladimir and Larryandersen2001-05-221-64/+89
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2706 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Lars Kellogg-Stedman <lars@larsshack.org> to fix bugandersen2001-05-211-3/+3
| | | | | | | #1130 (i.e. When you turn on features it should always ADD features) git-svn-id: svn://busybox.net/trunk/busybox@2690 69ca8d6d-28ef-0310-b511-8ec308f3f277
* The latest patch from Larryandersen2001-05-211-31/+61
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2682 69ca8d6d-28ef-0310-b511-8ec308f3f277
* This is a patch from Vladimir:andersen2001-05-191-198/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | > I rewrite *local_variable* function in hush.c with: > 1) remove many memory leaks > 2) add support read_only protect (require write builtin function for set this, > I write this special for variable HUSH_VERION=0.01) > 3) commad read set only local variable now > 4) remove many error messages if "set unset export" not defined variable > (bash syntax not put and set error code). Hmm, if I set result to -1, you hush > called waitpid and returned with error "no waitpid" ( i not found place this > error). > 5) destroy error in new version check xgetcwd()==NULL and set "(unknow)" - > this have error: crashe in next call `pwd`, but xgetcwd(not null) called > free(arg). > 6) next add integraion with libbb Valdimir's patch missed two cases of local variable handling FOO=bar export FOO=baz unset FOO and export FOO=bar FOO=baz which were working before, so I fixed those two cases. git-svn-id: svn://busybox.net/trunk/busybox@2677 69ca8d6d-28ef-0310-b511-8ec308f3f277