oweals/busybox.git
16 years agohush: die_sllep needs restoring only if job control is on
Denis Vlasenko [Mon, 11 Feb 2008 08:44:36 +0000 (08:44 -0000)]
hush: die_sllep needs restoring only if job control is on

16 years agohush: close-on-exec interactive_fd
Denis Vlasenko [Mon, 11 Feb 2008 08:39:11 +0000 (08:39 -0000)]
hush: close-on-exec interactive_fd

16 years agohush: set CLOEXEC on script file being executed
Denis Vlasenko [Mon, 11 Feb 2008 08:35:03 +0000 (08:35 -0000)]
hush: set CLOEXEC on script file being executed

16 years agohush: fix the comment
Denis Vlasenko [Mon, 11 Feb 2008 08:32:31 +0000 (08:32 -0000)]
hush: fix the comment

16 years agohush: reset die_sleep to 0 in child after fork
Denis Vlasenko [Mon, 11 Feb 2008 08:30:53 +0000 (08:30 -0000)]
hush: reset die_sleep to 0 in child after fork

16 years agogetpot: add support for "a+" specifier for nonnegative int parameters.
Denis Vlasenko [Sun, 10 Feb 2008 19:44:20 +0000 (19:44 -0000)]
getpot: add support for "a+" specifier for nonnegative int parameters.
By Vladimir Dronnikov <dronnikov at gmail.com>.
fdisk and top are converted as an example.

function                                             old     new   delta
getopt32                                            1340    1370     +30
top_main                                            1137    1120     -17
fdisk_main                                          3033    2949     -84
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 30/-101)           Total: -71 bytes

16 years agomicrocom: read more than 1 byte from device, if possible
Denis Vlasenko [Sun, 10 Feb 2008 19:05:56 +0000 (19:05 -0000)]
microcom: read more than 1 byte from device, if possible

16 years agoash: fix "orwell bug" 1984. Testcase:
Denis Vlasenko [Sun, 10 Feb 2008 19:02:53 +0000 (19:02 -0000)]
ash: fix "orwell bug" 1984. Testcase:
    trap_handler() {
        echo trap
    }
    trap trap_handler USR1
    sleep 3600 &
    while true; do wait; done

16 years agohush: small fixes to docs/testsuite
Denis Vlasenko [Sun, 10 Feb 2008 16:00:30 +0000 (16:00 -0000)]
hush: small fixes to docs/testsuite

16 years agohush: reinstate `cmd` handling for NOMMU (with fat big warning).
Denis Vlasenko [Sun, 10 Feb 2008 12:10:08 +0000 (12:10 -0000)]
hush: reinstate `cmd` handling for NOMMU (with fat big warning).
hush: fix a case where none of pipe members could be started
  because of fork failure
hush: rename functions: xxx_real -> xxx
hush: try to add a bit more of vfork-friendliness
hush: add rudimentary design docs
hush: add TODO (newly discovered bug with globbing)

16 years agomicrocom: compile fixes
Denis Vlasenko [Sat, 9 Feb 2008 11:39:00 +0000 (11:39 -0000)]
microcom: compile fixes

16 years agomicrocom: split -d (delay) option away from -t
Denis Vlasenko [Sat, 9 Feb 2008 11:37:21 +0000 (11:37 -0000)]
microcom: split -d (delay) option away from -t

16 years agobuild system: make it do without od -t
Denis Vlasenko [Sat, 9 Feb 2008 09:26:43 +0000 (09:26 -0000)]
build system: make it do without od -t

16 years agomktemp: don't advertise -q option
Denis Vlasenko [Sat, 9 Feb 2008 06:29:32 +0000 (06:29 -0000)]
mktemp: don't advertise -q option

16 years agomktemp: support -p DIR (Timo Teras <timo.teras at iki.fi>)
Denis Vlasenko [Sat, 9 Feb 2008 06:26:53 +0000 (06:26 -0000)]
mktemp: support -p DIR (Timo Teras <timo.teras at iki.fi>)

packed_usage                                       23595   23660     +65
mktemp_main                                          139     157     +18

16 years agotest: fix mishandling of 'test ! arg1 op arg2 more args'; add testsuite
Denis Vlasenko [Sat, 9 Feb 2008 05:48:42 +0000 (05:48 -0000)]
test: fix mishandling of 'test ! arg1 op arg2 more args'; add testsuite

16 years agosendmail: update from maintainer
Denis Vlasenko [Fri, 8 Feb 2008 18:24:54 +0000 (18:24 -0000)]
sendmail: update from maintainer

16 years agomicrocom: update from maintainer
Denis Vlasenko [Fri, 8 Feb 2008 17:30:39 +0000 (17:30 -0000)]
microcom: update from maintainer

16 years agoREADME: doccument the need of CONFIG_DESKTOP
Denis Vlasenko [Fri, 8 Feb 2008 15:41:01 +0000 (15:41 -0000)]
README: doccument the need of CONFIG_DESKTOP
od: fix help text to include -t
od: handle /proc files (which have filesize 0) correctly
od: fix comments to not lie about return value
od: "%u" is 1 byte less than "%zu"
cat: fix English

16 years agohttpd: add a bit of error logging; a few code simplifications. +29 bytes.
Denis Vlasenko [Fri, 8 Feb 2008 15:21:55 +0000 (15:21 -0000)]
httpd: add a bit of error logging; a few code simplifications. +29 bytes.

16 years ago- add eject -s for SCSI- and USB-devices (Nico Erfurth)
Bernhard Reutner-Fischer [Fri, 8 Feb 2008 15:04:00 +0000 (15:04 -0000)]
- add eject -s for SCSI- and USB-devices (Nico Erfurth)

16 years agoforce disable setlocalversion usage in busybox
Mike Frysinger [Thu, 7 Feb 2008 22:44:27 +0000 (22:44 -0000)]
force disable setlocalversion usage in busybox

16 years agosome more fixes for cross-compiling on an OS X host: apple provides core types so...
Mike Frysinger [Thu, 7 Feb 2008 22:41:33 +0000 (22:41 -0000)]
some more fixes for cross-compiling on an OS X host: apple provides core types so dont redefine them, sys/statfs.h is not available, and only use some newer AF_* defines if they are actually available

16 years agoonly include mntent.h according to HAVE_MNTENT_H and dont define this on OS X
Mike Frysinger [Thu, 7 Feb 2008 22:10:07 +0000 (22:10 -0000)]
only include mntent.h according to HAVE_MNTENT_H and dont define this on OS X

16 years agoudhcp: ifdef out unused members
Denis Vlasenko [Mon, 4 Feb 2008 13:23:53 +0000 (13:23 -0000)]
udhcp: ifdef out unused members

16 years agoudhcp: optional support for non-standard DHCP ports (+300 bytes when selected)
Denis Vlasenko [Mon, 4 Feb 2008 13:12:16 +0000 (13:12 -0000)]
udhcp: optional support for non-standard DHCP ports (+300 bytes when selected)

16 years agounzip: do not try to read entire compressed stream at once (it can be huge)
Denis Vlasenko [Mon, 4 Feb 2008 12:12:48 +0000 (12:12 -0000)]
unzip: do not try to read entire compressed stream at once (it can be huge)
unzip: handle short reads correctly

16 years agozcip: open ARP socket before openlog
Denis Vlasenko [Mon, 4 Feb 2008 09:42:05 +0000 (09:42 -0000)]
zcip: open ARP socket before openlog
(else we can thrash syslog socket)

16 years agonohup: compat patch by Christoph Gysin <mailinglist.cache at gmail.com>
Denis Vlasenko [Mon, 4 Feb 2008 00:30:06 +0000 (00:30 -0000)]
nohup: compat patch by Christoph Gysin <mailinglist.cache at gmail.com>

16 years agomkswap: do not do extra seek
Denis Vlasenko [Sun, 3 Feb 2008 23:52:41 +0000 (23:52 -0000)]
mkswap: do not do extra seek
mount: add another mount helper call method

16 years agops: fixlet to disabled compat code
Denis Vlasenko [Sun, 3 Feb 2008 22:04:19 +0000 (22:04 -0000)]
ps: fixlet to disabled compat code

16 years agoash: readability enhancement, no code changes
Denis Vlasenko [Sun, 3 Feb 2008 22:01:08 +0000 (22:01 -0000)]
ash: readability enhancement, no code changes

16 years agogetty: don't try to detect parity on local lines
Denis Vlasenko [Sat, 2 Feb 2008 19:05:36 +0000 (19:05 -0000)]
getty: don't try to detect parity on local lines
(Joakim Tjernlund <Joakim.Tjernlund at transmode.se>)

16 years agofsck: don't kill pid -1! (Roy Marples <roy at marples.name>)
Denis Vlasenko [Sat, 2 Feb 2008 18:54:58 +0000 (18:54 -0000)]
fsck: don't kill pid -1! (Roy Marples <roy at marples.name>)

16 years agomsh: also handle EOF/read errors correctly
Denis Vlasenko [Sat, 2 Feb 2008 18:50:50 +0000 (18:50 -0000)]
msh: also handle EOF/read errors correctly

16 years agomsh: fix Ctrl-C handling with line editing
Denis Vlasenko [Sat, 2 Feb 2008 18:35:55 +0000 (18:35 -0000)]
msh: fix Ctrl-C handling with line editing

16 years agosendmail: fixes by Vladimir Dronnikov <dronnikov at gmail.com>
Denis Vlasenko [Sat, 2 Feb 2008 17:54:35 +0000 (17:54 -0000)]
sendmail: fixes by Vladimir Dronnikov <dronnikov at gmail.com>

16 years agops: add (disabled) compat code
Denis Vlasenko [Sat, 2 Feb 2008 16:43:51 +0000 (16:43 -0000)]
ps: add (disabled) compat code

16 years agonc: fix fallout from C99 standard compliance change
Denis Vlasenko [Sat, 2 Feb 2008 16:23:43 +0000 (16:23 -0000)]
nc: fix fallout from C99 standard compliance change

16 years agoFix compilation error when FEATURE_FANCY_PING enabled. Also
Paul Fox [Fri, 1 Feb 2008 23:25:32 +0000 (23:25 -0000)]
Fix compilation error when FEATURE_FANCY_PING enabled.  Also
reorder networking/Config.in moving FEATURE_FANCY_PING next to
PING6.  (Cristian Ionescu-Idbohrn)

16 years agoadd support for renaming/relocating device nodes
Mike Frysinger [Fri, 1 Feb 2008 06:53:50 +0000 (06:53 -0000)]
add support for renaming/relocating device nodes

16 years agoadd a mini-faq about std{in,out,err}
Mike Frysinger [Fri, 1 Feb 2008 01:41:57 +0000 (01:41 -0000)]
add a mini-faq about std{in,out,err}

16 years ago- be C99 friendly. Anonymous unions are a GNU extension. This change is
Bernhard Reutner-Fischer [Tue, 29 Jan 2008 10:33:34 +0000 (10:33 -0000)]
- be C99 friendly. Anonymous unions are a GNU extension. This change is
  size-neutral WRT -std=gnu99 and fixes several compilation errors for strict
  C99 mode.

16 years agoinit: allow last line to be not terminated by '\n'
Denis Vlasenko [Tue, 29 Jan 2008 09:56:21 +0000 (09:56 -0000)]
init: allow last line to be not terminated by '\n'

16 years agomount: allow and ignore _netdev option
Denis Vlasenko [Tue, 29 Jan 2008 09:31:09 +0000 (09:31 -0000)]
mount: allow and ignore _netdev option

16 years ago- update defconfig
Bernhard Reutner-Fischer [Tue, 29 Jan 2008 09:28:02 +0000 (09:28 -0000)]
- update defconfig

16 years agoash: code readability enhancements, no real code changes
Denis Vlasenko [Tue, 29 Jan 2008 09:23:49 +0000 (09:23 -0000)]
ash: code readability enhancements, no real code changes

16 years agosendmail: really svn add it
Denis Vlasenko [Tue, 29 Jan 2008 00:59:15 +0000 (00:59 -0000)]
sendmail: really svn add it

16 years ago*: move getopt reset code to better place(s)
Denis Vlasenko [Mon, 28 Jan 2008 22:57:10 +0000 (22:57 -0000)]
*: move getopt reset code to better place(s)

16 years agosendmail: new applet by dronnikov at gmail.com
Denis Vlasenko [Mon, 28 Jan 2008 22:47:03 +0000 (22:47 -0000)]
sendmail: new applet by dronnikov at gmail.com

16 years ago*: tidy up usage of char **environ
Denis Vlasenko [Mon, 28 Jan 2008 22:45:43 +0000 (22:45 -0000)]
*: tidy up usage of char **environ

16 years agomicrocom: undo #define trick, gcc fails to take advantage of it
Denis Vlasenko [Mon, 28 Jan 2008 09:39:30 +0000 (09:39 -0000)]
microcom: undo #define trick, gcc fails to take advantage of it

16 years agomkswap, readahead: stop using fdlength, it is reported to be unreliable
Denis Vlasenko [Sun, 27 Jan 2008 23:41:34 +0000 (23:41 -0000)]
mkswap, readahead: stop using fdlength, it is reported to be unreliable

16 years agostty: fix mishandling of 'control' keywords (Ralf Friedl <Ralf.Friedl@online.de>)
Denis Vlasenko [Sun, 27 Jan 2008 23:24:31 +0000 (23:24 -0000)]
stty: fix mishandling of 'control' keywords (Ralf Friedl <Ralf.Friedl@online.de>)

16 years agomicrocom: update from the author
Denis Vlasenko [Sun, 27 Jan 2008 22:40:39 +0000 (22:40 -0000)]
microcom: update from the author

16 years agotentatively fix getopt state corruption for NOFORK applets
Denis Vlasenko [Sun, 27 Jan 2008 22:39:55 +0000 (22:39 -0000)]
tentatively fix getopt state corruption for NOFORK applets

16 years ago- fix conflicting decls of syslog related facilitynames and prioritynames tables
Bernhard Reutner-Fischer [Sun, 27 Jan 2008 12:50:12 +0000 (12:50 -0000)]
- fix conflicting decls of syslog related facilitynames and prioritynames tables

16 years agodo not respect CONFIG_MODULES as it breaks building if it is defined in the build env
Mike Frysinger [Sun, 27 Jan 2008 09:41:24 +0000 (09:41 -0000)]
do not respect CONFIG_MODULES as it breaks building if it is defined in the build env

16 years agoudhcpc: filter unwanted packets in kernel
Denis Vlasenko [Fri, 25 Jan 2008 22:46:34 +0000 (22:46 -0000)]
udhcpc: filter unwanted packets in kernel
(Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>)

16 years agofdisk: comment out unused function
Denis Vlasenko [Fri, 25 Jan 2008 20:18:46 +0000 (20:18 -0000)]
fdisk: comment out unused function

16 years agoudhcpc: fix wrong options in decline and release packets
Denis Vlasenko [Fri, 25 Jan 2008 19:27:08 +0000 (19:27 -0000)]
udhcpc: fix wrong options in decline and release packets
(Jonas Danielsson <jonas.danielsson at axis.com>)

16 years agofdisk: fix a case where break was reached only for DOS labels
Denis Vlasenko [Thu, 24 Jan 2008 22:49:15 +0000 (22:49 -0000)]
fdisk: fix a case where break was reached only for DOS labels

16 years agohalt: write wtmp entry if wtmp support is enabled
Denis Vlasenko [Thu, 24 Jan 2008 02:28:00 +0000 (02:28 -0000)]
halt: write wtmp entry if wtmp support is enabled

16 years agohalt: update help text
Denis Vlasenko [Thu, 24 Jan 2008 02:27:30 +0000 (02:27 -0000)]
halt: update help text

16 years agocomment fix
Denis Vlasenko [Thu, 24 Jan 2008 01:33:42 +0000 (01:33 -0000)]
comment fix

16 years agocrond: small code shrink and readability enhancements
Denis Vlasenko [Thu, 24 Jan 2008 01:33:12 +0000 (01:33 -0000)]
crond: small code shrink and readability enhancements

16 years agogrep: fix wrong filename in error message
Denis Vlasenko [Thu, 24 Jan 2008 01:30:36 +0000 (01:30 -0000)]
grep: fix wrong filename in error message

16 years agoas reported by George Boudreau, make sure we properly skip blank lines
Mike Frysinger [Wed, 23 Jan 2008 18:48:26 +0000 (18:48 -0000)]
as reported by George Boudreau, make sure we properly skip blank lines

16 years ago- Fix hdparm's ioctl parameter passing (John Brandwood)
Bernhard Reutner-Fischer [Sat, 19 Jan 2008 11:27:11 +0000 (11:27 -0000)]
- Fix hdparm's ioctl parameter passing (John Brandwood)

16 years agoeliminated CONFIG_FEATURE_EDITING_FANCY_KEYS. the size savings
Paul Fox [Fri, 18 Jan 2008 20:41:24 +0000 (20:41 -0000)]
eliminated CONFIG_FEATURE_EDITING_FANCY_KEYS.  the size savings
was small, compared to the total size of the command-line editing
features, and it removed key bindings that most wouldn't consider
"fancy", like ^U, and 'l' and 'h' in vi mode, ^F and ^B in emacs
mode.

16 years ago- correct helptext of stat (Cristian Ionescu-Idbohrn)
Bernhard Reutner-Fischer [Thu, 17 Jan 2008 11:05:09 +0000 (11:05 -0000)]
- correct helptext of stat (Cristian Ionescu-Idbohrn)

16 years ago- implement brctl setpathcost, setportprio, setbridgeprio, stp
Bernhard Reutner-Fischer [Mon, 14 Jan 2008 16:10:11 +0000 (16:10 -0000)]
- implement brctl setpathcost, setportprio, setbridgeprio, stp
   text    data     bss     dec     hex filename
    907      20       0     927     39f networking/brctl.o

16 years ago- mention strtod code-duplication as TODO for cleanup
Bernhard Reutner-Fischer [Mon, 14 Jan 2008 14:32:56 +0000 (14:32 -0000)]
- mention strtod code-duplication as TODO for cleanup

16 years ago- shrink a bit and implement time related fancy features. Improve help texts.
Bernhard Reutner-Fischer [Sun, 13 Jan 2008 18:43:50 +0000 (18:43 -0000)]
- shrink a bit and implement time related fancy features. Improve help texts.
   text    data     bss     dec     hex filename
    253      20       0     273     111 networking/brctl.o.bare
    613      20       0     633     279 networking/brctl.o.fancy-time

16 years ago- fix commentary typo
Bernhard Reutner-Fischer [Sun, 13 Jan 2008 17:52:53 +0000 (17:52 -0000)]
- fix commentary typo

16 years ago- save four bytes by manually hoisting the br assignment
Bernhard Reutner-Fischer [Sun, 13 Jan 2008 15:43:28 +0000 (15:43 -0000)]
- save four bytes by manually hoisting the br assignment

16 years ago- update defconfig
Bernhard Reutner-Fischer [Sun, 13 Jan 2008 15:33:13 +0000 (15:33 -0000)]
- update defconfig

16 years ago- new applet brctl
Bernhard Reutner-Fischer [Sun, 13 Jan 2008 15:23:27 +0000 (15:23 -0000)]
- new applet brctl
   text    data     bss     dec     hex filename
    289      20       0     309     135 networking/brctl.o
    335      23       0     358     166 networking/brctl-verbose-ops.o

16 years ago- add ipsvd
Bernhard Reutner-Fischer [Fri, 11 Jan 2008 20:52:45 +0000 (20:52 -0000)]
- add ipsvd

16 years agoenable use of ^V prefix to allow forced insertion of any character. in
Paul Fox [Fri, 11 Jan 2008 16:50:08 +0000 (16:50 -0000)]
enable use of ^V prefix to allow forced insertion of any character.  in
particular, without this it's impossible to enter a TAB on the commandline
(whether tab completion is enabled or not).

16 years agoallow 8-bit characters
Paul Fox [Fri, 11 Jan 2008 16:12:57 +0000 (16:12 -0000)]
allow 8-bit characters

16 years agotac: handle NULs properly. +145 bytes
Denis Vlasenko [Wed, 9 Jan 2008 23:00:00 +0000 (23:00 -0000)]
tac: handle NULs properly. +145 bytes

16 years agohush: report [v]fork failures
Denis Vlasenko [Tue, 8 Jan 2008 20:32:12 +0000 (20:32 -0000)]
hush: report [v]fork failures
hush: more correct handling of piping
config: add CONFIG_NOMMU

16 years agowhitespace fixes
Denis Vlasenko [Mon, 7 Jan 2008 19:06:47 +0000 (19:06 -0000)]
whitespace fixes

16 years agops: fix yet another buglet from recent ulltoa conversion :(
Denis Vlasenko [Mon, 7 Jan 2008 16:51:25 +0000 (16:51 -0000)]
ps: fix yet another buglet from recent ulltoa conversion :(

16 years agops: fix COMMAND column adjustment
Denis Vlasenko [Mon, 7 Jan 2008 16:41:41 +0000 (16:41 -0000)]
ps: fix COMMAND column adjustment

16 years agotac: *really* add tac.c now
Denis Vlasenko [Mon, 7 Jan 2008 16:14:14 +0000 (16:14 -0000)]
tac: *really* add tac.c now

16 years agops: fix build breakage from vda's recent commit
Denis Vlasenko [Mon, 7 Jan 2008 16:13:14 +0000 (16:13 -0000)]
ps: fix build breakage from vda's recent commit
*: whitespace fixes

16 years agosyslogd: fix shmat error check
Denis Vlasenko [Mon, 7 Jan 2008 15:58:02 +0000 (15:58 -0000)]
syslogd: fix shmat error check

16 years agotac: new applet. ~240 bytes.
Denis Vlasenko [Sun, 6 Jan 2008 06:27:17 +0000 (06:27 -0000)]
tac: new applet. ~240 bytes.

Copyright (C) 2003  Yang Xiaopeng  <yxp at hanwang.com.cn>
Copyright (C) 2007  Natanael Copa  <natanael.copa@gmail.com>
Copyright (C) 2007  Tito Ragusa    <farmatito@tiscali.it>

16 years agops: fix overflow in USER and VSZ columns
Denis Vlasenko [Sun, 6 Jan 2008 03:26:53 +0000 (03:26 -0000)]
ps: fix overflow in USER and VSZ columns

function                                             old     new   delta
smart_ulltoa4                                          -     280    +280
smart_ulltoa5                                        283     408    +125
ulltoa6_and_space                                      -      25     +25
scale                                                 28      38     +10
bbunpack                                             358     366      +8
ps_main                                              259     261      +2
glob3                                                 35      37      +2
fill_bounds                                          172     174      +2
process_stdin                                        456     446     -10
smart_ulltoa6                                        406       -    -406
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 6/1 up/down: 454/-416)           Total: 38 bytes

16 years agops: add conditional support for -o [e]time
Denis Vlasenko [Sat, 5 Jan 2008 03:26:41 +0000 (03:26 -0000)]
ps: add conditional support for -o [e]time

16 years agoMakefile.help: removing allbareconfig target from help
Denis Vlasenko [Fri, 4 Jan 2008 20:10:51 +0000 (20:10 -0000)]
Makefile.help: removing allbareconfig target from help
applet_tables: fix allnoconfig

16 years agoip route: "ip route" was misbehaving (extra argv+1 ate 1st env var)
Denis Vlasenko [Fri, 4 Jan 2008 15:28:28 +0000 (15:28 -0000)]
ip route: "ip route" was misbehaving (extra argv+1 ate 1st env var)

16 years agoinit: wait for orphaned children too while waiting
Denis Vlasenko [Fri, 4 Jan 2008 15:10:47 +0000 (15:10 -0000)]
init: wait for orphaned children too while waiting
for sysinit-like processes (Harald Küthe <harald-tuxbox@arcor.de>)

16 years agosyslogd: avoid excessive tine() system calls
Denis Vlasenko [Thu, 3 Jan 2008 12:13:42 +0000 (12:13 -0000)]
syslogd: avoid excessive tine() system calls

function                                             old     new   delta
timestamp_and_log_internal                             -      24     +24
log_locally                                          741     744      +3
timestamp_and_log                                    313     314      +1
syslogd_main                                         904     897      -7
quit_signal                                          101      94      -7
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/2 up/down: 28/-14)             Total: 14 bytes

16 years agosyslogd: don't die if remote host's IP cannot be resolved.
Denis Vlasenko [Thu, 3 Jan 2008 12:12:27 +0000 (12:12 -0000)]
syslogd: don't die if remote host's IP cannot be resolved.
retry resolutions every two minutes instead.

function                                             old     new   delta
syslogd_main                                         865     904     +39
timestamp_and_log                                    324     313     -11
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 39/-11)             Total: 28 bytes

16 years agolibbb: introduce and use safe_waitpid (loops in EINTR)
Denis Vlasenko [Wed, 2 Jan 2008 19:55:04 +0000 (19:55 -0000)]
libbb: introduce and use safe_waitpid (loops in EINTR)
*: use more approproate (shorter) versions of wait()

function                                             old     new   delta
safe_waitpid                                           -      48     +48
wait_any_nohang                                        -      17     +17
send_tree                                            365     369      +4
processorstop                                        432     435      +3
text_yank                                            110     108      -2
make_human_readable_str                              202     200      -2
crond_main                                          1368    1366      -2
handle_sigchld                                        49      43      -6
reapchild                                            166     159      -7
custom                                               260     250     -10
checkscript                                          191     177     -14
wait_nohang                                           17       -     -17
wait_pid                                              43       -     -43
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 2/7 up/down: 72/-103)           Total: -31 bytes

16 years agoadding libbb/printable.c
Denis Vlasenko [Sun, 30 Dec 2007 20:13:39 +0000 (20:13 -0000)]
adding libbb/printable.c

16 years agolibbb: introduce fputc_printable (from ed)
Denis Vlasenko [Sun, 30 Dec 2007 01:59:53 +0000 (01:59 -0000)]
libbb: introduce fputc_printable (from ed)
netstat: print control chars as ^C etc
vi: style fixlet

function                                             old     new   delta
fputc_printable                                        -     100    +100
unix_do_one                                          451     487     +36
printLines                                           258     190     -68
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 136/-68)            Total: 68 bytes