aboutsummaryrefslogtreecommitdiff
path: root/shell/lash.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Shaun Jackman writes: Newlib uses both __getopt_initialized and optind to ↵vapier2005-03-041-5/+11
| | | | | | track initialization of getopt() git-svn-id: svn://busybox.net/trunk/busybox@9972 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Joe.C writes: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 git-svn-id: svn://busybox.net/trunk/busybox@9100 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Jamie Guinan writes:andersen2004-04-121-1/+1
| | | | | | | | | | | | | | 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-9/+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-3/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8630 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix some goofy formattingandersen2004-03-121-4/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8623 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch by Felipe Kellermann to fix a compiler compatability problembug12004-03-051-6/+6
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8575 69ca8d6d-28ef-0310-b511-8ec308f3f277
* oops. Leave the default feature set enbled for now...andersen2004-02-101-2/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8442 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Initial effort at disabling job control as wellandersen2004-02-101-6/+35
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8441 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Support disabling pipe and redirect supportandersen2004-02-101-40/+67
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8440 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Update a bunch of docs. Run a script to update my email addr.andersen2003-07-141-2/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@7061 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Major coreutils update.mjn32003-03-191-35/+35
| | | | git-svn-id: svn://busybox.net/trunk/busybox@6751 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Squash a warning by making function declaration a proper prototypeandersen2002-12-111-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@6164 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Change if(x)free(x); to free(x);aaronl2002-11-281-8/+4
| | | | git-svn-id: svn://busybox.net/trunk/busybox@6055 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Teach lash to get $1 $2 $3 etc correctandersen2002-11-081-1/+1
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@5876 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Use %m, not strerror, and strerror(err) was broken anyways and should have beenandersen2002-09-301-1/+1
| | | | | | | strerror(errno). Problem noted by Alexey V. Neyman <alex.neyman@auriga.ru> git-svn-id: svn://busybox.net/trunk/busybox@5611 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Avoid calling exit() from within fork/vfork'ed processes.andersen2002-09-261-3/+7
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@5594 69ca8d6d-28ef-0310-b511-8ec308f3f277
* A couple of small bugfixes from Marshall M. Midden <m4@brecis.com>andersen2002-07-311-3/+6
| | | | git-svn-id: svn://busybox.net/trunk/busybox@5132 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix a buffer overflow found by Gerardo Puga <gpuga@gioia.ing.unlp.edu.ar>andersen2002-06-061-1/+1
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@4869 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Remove `== TRUE' tests and convert `!= TRUE' and `== FALSE' tests to use !.kraai2001-12-201-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@3925 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Begin moving things to busybox.netandersen2001-12-081-1/+1
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@3871 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Change strdup calls to xstrdup (patch from Steve Merrifield).kraai2001-11-121-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@3666 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Add in some (theoretical) uClinux support. Some init cleanupsandersen2001-10-281-1/+6
| | | | 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-18/+20
| | | | | | | -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-0/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@3548 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Magnus Damm <damm@opensource.se> to avoid lash hangingandersen2001-10-031-1/+7
| | | | | | | on serial ports git-svn-id: svn://busybox.net/trunk/busybox@3475 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix a warning and potential segfault in lash when BB_FEATURE_CLEAN_UPandersen2001-08-221-2/+2
| | | | | | | is enabled git-svn-id: svn://busybox.net/trunk/busybox@3331 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Allow multiple shells to be enabled.kraai2001-08-011-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@3177 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from vodz:andersen2001-07-121-5/+1
| | | | | | | | | | 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
* don't whine if all we need to do is remove a bg jobandersen2001-06-271-1/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2919 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Re-enable globbing (I'd accidentaly removed it) and finish off the lastandersen2001-06-271-10/+224
| | | | | | | | of the job control polishing. Works fine now. -Erik git-svn-id: svn://busybox.net/trunk/busybox@2916 69ca8d6d-28ef-0310-b511-8ec308f3f277
* This should finish off the job control issues with lash. Make certainandersen2001-06-251-15/+46
| | | | | | | | we have a controlling terminal... -Erik git-svn-id: svn://busybox.net/trunk/busybox@2896 69ca8d6d-28ef-0310-b511-8ec308f3f277
* This commit guts lash, restoring it to what it was originally intended to do,andersen2001-06-211-582/+32
| | | | | | | | | just be a simple command line interpreter with basic pipe, redirect, and job control. For all the more fancy things, people should use hush or ash. -Erik git-svn-id: svn://busybox.net/trunk/busybox@2871 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from larry to fix some grammar errors.andersen2001-05-231-2/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2715 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
* Change 'printf("%s\n", ...)' into 'puts(...)'. Noted and patched in hostname.ckraai2001-05-161-2/+2
| | | | | | | by Larry Doolittle. git-svn-id: svn://busybox.net/trunk/busybox@2653 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix up some silly warningsandersen2001-05-111-3/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2614 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix a segfault in lash, hush, and cmdedit. Each of these usedandersen2001-05-111-2/+7
| | | | | | | | | 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 git-svn-id: svn://busybox.net/trunk/busybox@2613 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Moved some #ifdefs down below #include "busybox.h" where they belong.markw2001-04-251-2/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2436 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Some patches from Gennady Feldman. Fixed a glob problem such thatandersen2001-04-231-5/+5
| | | | | | | | 'ls *.h Config.h' works. Fixed a silly typo with fg/bg process control. Made cmdedit exit sanely when it cannot read input. git-svn-id: svn://busybox.net/trunk/busybox@2402 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Another banner consolidation from Larry Doolittle <ldoolitt@recycle.lbl.gov>.kraai2001-04-121-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2339 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix handling of '' and "".kraai2001-04-121-4/+6
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2334 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Apply Vladimir's latest cleanup patch.andersen2001-04-091-22/+15
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@2288 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Avoid segfault when export is invoked with no arguments. Thanks tokraai2001-04-041-0/+1
| | | | | | | Gennady Feldman. git-svn-id: svn://busybox.net/trunk/busybox@2241 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Add in a new standalone env applet for fixing up app's environmentsandersen2001-03-291-16/+5
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@2224 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix to last patch: locale code should be 9, not 7.markw2001-03-271-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2199 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Applied patch from Vladimir N. Oleynik to add locale support to the shell permarkw2001-03-271-0/+6
| | | | | | | bug report from Ralph Jones. git-svn-id: svn://busybox.net/trunk/busybox@2198 69ca8d6d-28ef-0310-b511-8ec308f3f277
* -Wshadow sh fix from Jeff Garzikandersen2001-03-231-2/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2190 69ca8d6d-28ef-0310-b511-8ec308f3f277
* A nice patch from Larry Doolittle that adds -Wshadow andandersen2001-03-211-35/+35
| | | | | | | cleans up most of the now-revealed problems. git-svn-id: svn://busybox.net/trunk/busybox@2177 69ca8d6d-28ef-0310-b511-8ec308f3f277