Commit Graph

1782 Commits

Author SHA1 Message Date
Matt Kraai
e6bf66eada Fix two bugs reported by Ralph Jones. 2001-05-04 14:49:58 +00:00
Eric Andersen
b0aca921be A todo update from larry to acknowledge the existance of hush 2001-05-03 17:35:48 +00:00
Eric Andersen
87d893c04b devfs does not support creation of regular files. So change the
test a bit so as to not possibly create a regular file.
 -Erik
2001-05-03 07:01:41 +00:00
Matt Kraai
6689140597 Remove summary header. Not present in GNU or SUSv2. 2001-05-03 04:45:40 +00:00
Matt Kraai
80abc45182 Move up waitpid error check so that errno isn't clobbered by tcsetpgrp. 2001-05-02 21:48:17 +00:00
Matt Kraai
adcbc12d85 Canonicalize path before trying to unmount it. 2001-05-02 21:24:51 +00:00
Matt Kraai
3425111bb9 Fix bug #1108 by always canonicalizing arguments. 2001-05-02 21:17:38 +00:00
Eric Andersen
0fcd447d59 Some more job control updates. It will now sucessfully background
stuff.  Good luck getting things back into the foreground though...
 -Erik
2001-05-02 20:12:03 +00:00
Matt Kraai
20a3069ec0 Don't treat newline as pipe separator when processing substitutions. 2001-05-02 17:52:49 +00:00
Eric Andersen
19ec9ee91e Use .png for images (removing all .gifs) and make them all 90x36
-Erik
2001-05-02 17:19:25 +00:00
Matt Kraai
9f8caf134f Fix $(...) construction. Noted and patched by Larry Doolittle
<ldoolitt@recycle.lbl.gov>.  I'm just a patch whore.  :)
2001-05-02 16:26:12 +00:00
Eric Andersen
bafd94f154 First pass at getting job control working. This gets the infrastructure
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-02 16:11:59 +00:00
Matt Kraai
1c8a59ab95 Use the current pgrp, not pid, when resetting the foreground process group.
Fixes bizarre suspension when executing `echo`.
2001-05-02 15:37:09 +00:00
Matt Kraai
f162e7d09d Don't segfault if the first word is the empty string. 2001-05-02 14:48:48 +00:00
Eric Andersen
e67c3ce327 Another update from Larry:
Makes hush return code equal to that of the last command executed.
    Fixes the mode where input comes from a file.
2001-05-02 02:09:36 +00:00
Matt Kraai
e0244b0642 Skip headers with empty filenames, rather than stopping. 2001-05-01 21:12:31 +00:00
Eric Andersen
b9f5b82339 Another refinement, this time from Larry. 2001-05-01 16:24:32 +00:00
Eric Andersen
6d553ef200 Argh. Now we break non-pristine builds. Check a bit more carefully.
-Erik
2001-05-01 14:54:35 +00:00
Eric Andersen
abde065935 Oops. The dangers of applying patches by hand... 2001-05-01 14:37:03 +00:00
Eric Andersen
4ed5e37d4b Another hush update from Larry:
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-05-01 01:49:50 +00:00
Eric Andersen
3f99b567b8 A patch from Larry to fix pristine source builds (again).
I just can't seem to _not_ break it.  Sigh.
2001-05-01 01:40:34 +00:00
Eric Andersen
aac75e5a78 Some more hush.c updates from Larry Doolittle. 2001-04-30 18:18:45 +00:00
Eric Andersen
0e9aef36fa Oops. I was a bit too hasty and also changed applet_name. 2001-04-30 18:18:02 +00:00
Mark Whitley
8a633268ef Made new xreadlink function for libbb and changed applets to use it instead of
readlink(2).
2001-04-30 18:17:00 +00:00
Eric Andersen
6f34394454 These messages can be .rodata, so make them even more const.
-Erik
2001-04-30 18:08:03 +00:00
Eric Andersen
65504ac12c These do not need initial values. Let them live in the bss.
-Erik
2001-04-30 18:07:24 +00:00
Eric Andersen
defa4f93c2 Per suggestion by Matt, make sh.c a real target. There is no
need for the useless sh_link dummy target -- use the real thing.
 -Erik
2001-04-30 17:52:36 +00:00
Matt Kraai
218aa370b4 Fix user permissions of copied directories. 2001-04-30 17:32:43 +00:00
Matt Kraai
43ca13714b Simplify permission handling for FIFOs. 2001-04-30 16:43:21 +00:00
Matt Kraai
24abecc349 Fix exit status when there is an error copying a file. 2001-04-30 16:37:04 +00:00
Glenn L McGrath
af166e7ce0 Logic reversal for last_char_is 2001-04-29 00:50:33 +00:00
David Kimdon
2bf4dad7ec fix to applet_source_list rule so Debian package continues to build 2001-04-28 16:37:23 +00:00
Eric Andersen
07e462fd6d Matt was complaining. Hopefully this helps the sh.c link situation 2001-04-27 18:36:43 +00:00
Matt Kraai
72ab975a6b Terminate source correctly when copying symlink. Report and patch by
Brian Webb <webbb@desertscenes.net>.
2001-04-27 15:40:27 +00:00
Eric Andersen
088875fec4 Use BUFSIZ for the_command to match size used in cmdedit 2001-04-27 07:49:41 +00:00
Eric Andersen
af44a0e8f4 An update to hush from Larry:
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-27 07:26:12 +00:00
Eric Andersen
0081466925 Be a bit more sneaky about the sh.c symlink so you don't need to
do a mke clean for it to happen.
 -Erik
2001-04-26 23:29:10 +00:00
Eric Andersen
0f9426edb0 Ignore some generated files 2001-04-26 23:23:04 +00:00
Eric Andersen
25f2703015 This is the initial checkin of Larry Doolittle's hush.c, using his
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-26 23:22:31 +00:00
Eric Andersen
a1dbc22469 Disable lash
-Erik
2001-04-26 23:10:22 +00:00
Eric Andersen
924ab5b7d3 These days busybox.pod is autogenerated, so it should be removed
from CVS.
2001-04-26 23:06:39 +00:00
Eric Andersen
7f3b86e7bf A fix from Larry for a corner case where insmod could end up
doing an xrealloc(0).
2001-04-26 19:29:58 +00:00
Matt Kraai
6aabfd5e30 Fix handling of permission addition and removal (e.g., o-r). 2001-04-26 18:55:29 +00:00
Eric Andersen
ca85cdbe4c Doh. I never allocated storate for the struct stat I am using.
There was just a never initialized pointer.
 -Erik
2001-04-26 18:43:36 +00:00
Matt Kraai
468f504fd7 Fix handling of -R flag. 2001-04-26 18:27:47 +00:00
Eric Andersen
c1bdffe99b Another nice cleanup from Larry. This adds a new last_char_is() function and
uses it to avoid possible buffer underruns whn strlen is zero, and avoid the
possible space-hogging inline of strlen() in several cases.
 -Erik
2001-04-26 15:56:47 +00:00
Eric Andersen
3c3277f0bd As Larry pointed out, this the off by one canbe fixed much more elegantly. 2001-04-26 15:41:51 +00:00
Eric Andersen
30592a5451 Fix a silly off-by-one error noticed by Santiago Garcia Mantinan <manty@debian.org>
-Erik
2001-04-26 14:56:45 +00:00
Mark Whitley
e55987896a Applied patch from Larry Doolittle to fix pristine build breakage. 2001-04-25 23:49:43 +00:00
Mark Whitley
2789906aad Removed obsoleted BB_FEATURE_RM_INTERACTIVE 2001-04-25 22:08:56 +00:00