Stephen Heumann
5c972aa397
Fix our handling of process groups for job control, working around a couple GNO bugs.
...
*Most significantly, we avoid using setpgid(), because it doesn't work and in fact corrupts the kernel's process group table.
*Also, work around tctpgrp() returning garbage instead of 0 on success.
This adds an implementation of tcsetpgrp that works by reading the process tables to find a process in the appropriate group. This isn't used for the main job control operations, though, since it might be relatively slow.
At this point, basic job control seems to work.
2014-11-21 23:05:38 -06:00
Stephen Heumann
95bcfc3b6e
Remove libbb/copyfd.c and an unused function that was its only caller.
2014-11-20 20:00:21 -06:00
Stephen Heumann
60b6415214
Add our own implementation of fnmatch (taken from NetBSD), because the one in GNO 2.0.6's libc is broken.
...
The version in libc both matches things it shouldn't and doesn't match things it should, in (at least) cases where a pattern includes additional stuff beyond a *.
2014-11-18 20:51:04 -06:00
Stephen Heumann
5f6121c091
Add initial support for getting terminal information from termcap, instead of hard-coding vt100-style codes.
...
This currently only supports output, and still doesn't quite display correctly in some cases.
2014-11-11 20:58:06 -06:00
Stephen Heumann
c8de71ae9d
Changes so that hush can successfully re-execute itself:
...
*initialize the "environ" variable
*Reduce the stack size to 8192 (This should still be further reduced based on analysis of usage.)
2014-11-08 18:03:25 -06:00
Stephen Heumann
bff0844d44
Add code to get the path of the current executable, which we need to re-execute the shell.
...
On the GS, this uses GS/OS calls. Versions for OS X and Linux are also included.
2014-11-07 23:06:34 -06:00
Stephen Heumann
cae994bc22
Add an emulation of waitpid that should be better than the one in libc.
...
In particular, it will buffer information about children other than the one being waited for, so it isn't lost. It can also emulate a non-blocking wait by arranging to interrupt the wait with a signal.
2014-11-07 12:12:18 -06:00
Stephen Heumann
3b1d003ea7
Handle globals more simply, declaring the "G" structure containing them directly in shell/hush.c.
...
This allows the "G" struct to show up in the debugger, so it can easily be inspected.
2014-11-06 13:08:38 -06:00
Stephen Heumann
9320c1e704
Set things up so hush can be build with debug code turned on.
...
This involved breaking things up into more segments in debug mode, since the code is larger. I also had to remove some unused extern definitions, which were causing link errors when debug code was enabled.
To enable debug code, pass "DEBUG=1" to make or build.gs.
2014-11-06 11:42:17 -06:00
Stephen Heumann
2669183517
Define segments and make other adjustments in makefile.
...
At this point, hush can successfully build and run, although it doesn't work correctly.
The main Makefile is now dedicated to the GNO build. There's now a separate makefile for building on modern systems with GCC/Clang.
2014-11-05 22:26:33 -06:00
Stephen Heumann
488a238ad7
Add an implementation of poll() written in terms of select(), to work around the lack of poll() on GNO.
...
This is a BSD-licensed poll() implementation by Brian M. Clapper. Its performance characteristics aren't as good as a "native" poll() would be, but this shouldn't be a problem in practice.
2014-11-03 12:26:43 -06:00
Stephen Heumann
051b79efc1
Move all the source files to 15-character ProDOS-compatible file names.
...
Dmake gets confused if you use over-15-character file names, so they needed to be shortened to get it to work. While I was at it, I also switched _ to . in the filenames so they're fully ProDOS compatible.
The shell/hush_test directory (not needed to build the code) still uses ProDOS-incompatible file names.
2014-11-02 22:11:07 -06:00
Stephen Heumann
a3d8a81bb0
Add makefile (which can be used on GNO or a modern system), and build scripts based on in.
2014-11-01 22:59:10 -05:00
Stephen Heumann
472db3bd56
Delete the stuff that's irrelevant to hush. Also, include (a simplified version of) the autoconf-generated headers and a simple build script, so it can easily be build in the hush-only configuration.
2014-10-26 22:39:01 -05:00
Denys Vlasenko
57434022ce
Start 1.23.0 development cycle
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-01 00:44:30 +01:00
Denys Vlasenko
a2dd4ee0e8
Bump version to 1.22.0
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-01 00:42:11 +01:00
Denys Vlasenko
f474dfa681
Start 1.22.0 development cycle
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-21 08:56:21 +01:00
Denys Vlasenko
64406a92a0
Bump version to 1.21.0
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-21 08:51:23 +01:00
Mike Frysinger
5694afd72a
build system: use pkg-config to look up selinux libs
...
Newer versions of libselinux has started linking against more libs.
Rather than continuing hardcoding things, switch to using pkg-config
to query for its dependencies.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-10-20 15:01:26 -04:00
Denys Vlasenko
b9d494453d
Start 1.21.0 development cycle
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-22 03:47:39 +02:00
Denys Vlasenko
f5234398ef
Bump version to 1.20.0
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-22 03:38:31 +02:00
Denys Vlasenko
8b141ebd45
Start 1.20.0 development cycle
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-13 08:56:58 +02:00
Denys Vlasenko
d84b175cb6
Bump version to 1.19.0, update copyright year in help message
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-13 08:46:00 +02:00
Daniel Fandrich
126f2b2853
Support configuring Busybox from _defconfig files
...
The existing test .config files are moved to configs/ and renamed
to *_defconfig. 'make xyz_defconfig' will enable the
configuration in that specific file.
Signed-off-by: Daniel Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-08 07:59:16 +02:00
Denys Vlasenko
d488f5e8db
build system: delete generated files on "make mrproper"
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-07 10:01:58 +02:00
Chris Rees
12caabfa2d
build system: do not use GNU-isms in find
...
Signed-off-by: Chris Rees <utisoft@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-30 09:41:39 +01:00
Denys Vlasenko
7386dd1e8a
Start 1.19.0 development cycle
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-11-23 12:50:40 +01:00
Denys Vlasenko
5ab20641d6
Bump version to 1.18.0
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-23 09:21:44 +01:00
Denys Vlasenko
833d4e7f84
rename archival/libunarchive -> archival/libarchive; move bz/ into it
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-03 02:38:31 +01:00
Denys Vlasenko
17fc33dfbd
finish busybox.1 renaming
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24 03:46:16 +02:00
Denys Vlasenko
9ce07e778f
bbconfig: add COMPRESS_BBCONFIG option
...
function old new delta
bbconfig_config_bz2 - 4905 +4905
bbconfig_main 13 70 +57
bbconfig_config 21811 - -21811
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/0 up/down: 4962/-21811) Total: -16849 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-29 14:36:11 +02:00
Denys Vlasenko
adbe3b5b98
build system: make 3.82 fix. Closes bug 2323
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-22 09:28:46 +02:00
Denys Vlasenko
89a1cace3b
Start 1.18.0 development cycle
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-06 15:47:35 +02:00
Denys Vlasenko
b2d95147c9
bump version to 1.17.0
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-06 04:16:50 +02:00
Denys Vlasenko
5c296de390
fix compile breakage with "make -j"
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-03 14:28:35 +02:00
Denys Vlasenko
8d444494ef
another fix to gen_build_files / autoconf.h dependency
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-25 13:56:28 +02:00
Denys Vlasenko
1d72d43940
gen_build_files.sh is an order prerequisite only for autoconf.h
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-25 13:30:59 +02:00
Denys Vlasenko
e69c5e2429
build system: make gen_build_files.sh run before autoconf.h generation
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-25 12:58:17 +02:00
Denys Vlasenko
6c5bf0d347
make it possible to have include/applets.h-esque entries in .c files
...
As an example, bunzip2 and bzcat is changed to use it.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-06 00:53:45 +02:00
Denys Vlasenko
4f63c7931c
fix unescaped $ in makefile
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-23 16:14:06 +02:00
Peter Tyser
0bb2980605
Makefile: Clean up auto-generated Kbuild and Config.in files
...
Previously these auto-generated files were left behind after a 'make
mrproper' was ran.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-16 02:48:21 +02:00
Denys Vlasenko
7fb68f199f
make it possible to keep Config/Kbuild snippets in *.c files
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-09 04:22:48 +02:00
Denys Vlasenko
e838779429
start 1.17.x development
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-26 08:34:49 +01:00
Denys Vlasenko
e52b735231
Bump version to 1.16.0
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-26 08:19:00 +01:00
Denys Vlasenko
18221506e5
build system: more fixes to parallel build
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-25 00:22:31 +01:00
Denys Vlasenko
b24c1139fb
build system: fix parallel make
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-24 22:23:21 +01:00
Bernhard Reutner-Fischer
bcb163d8f8
use .git as EXTRAVERSION
...
... and not .svn
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-08-24 16:20:52 +02:00
Denys Vlasenko
bd73f1d85a
Start 1.16.x cycle
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-23 21:30:38 +02:00
Denys Vlasenko
e7aa0d9eca
Releasing 1.15.0
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-23 02:33:20 +02:00
Denis Vlasenko
c3587223c7
Start 1.15.x development
2009-04-15 13:04:52 +00:00