Denis Vlasenko
1fe4e9e573
cosmetic change in message text
2007-11-15 00:57:40 +00:00
Paul Fox
ae6bf96659
bad syntax error should go to stderr
2007-11-14 23:48:35 +00:00
Denis Vlasenko
9b49a5ed85
add -fvisibility=hidden to CC flags, mark XXX_main functions
...
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-10-11 10:05:36 +00:00
Denis Vlasenko
a4f4de9b7e
print_signames_and_exit -> print_signames (because of "ash calls kill_main")
2007-09-30 16:32:01 +00:00
Denis Vlasenko
72e1c89d97
pgrep,pkill: new applets by Loic Grenie <loic.grenie@gmail.com>
2007-09-29 22:26:01 +00:00
Denis Vlasenko
b6adbf1be2
usage.c: remove reference to busybox.h
...
*: s/include "busybox.h"/include "libbb.h"
2007-05-26 19:00:18 +00:00
Denis Vlasenko
0cacc80952
kill: improve comment
2007-05-06 22:51:52 +00:00
Denis Vlasenko
02f47e9f81
kill: fix recent breakage of vda, also make code smaller by 21 bytes.
2007-05-06 22:48:55 +00:00
Denis Vlasenko
dcf4de20a1
test: code size saving, no logic changes
...
ps: fix warning, make a bit smaller
kill -l: make smaller & know much more signals
function old new delta
get_signum 121 153 +32
kill_main 826 843 +17
get_signame 44 36 -8
signals 252 224 -28
.rodata 131955 131923 -32
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/3 up/down: 49/-68) Total: -19 bytes
2007-05-01 20:07:29 +00:00
Denis Vlasenko
f20de5bb42
ash,kill: use common code for kill applet/builtin
...
# make bloatcheck
function old new delta
evaltreenr 644 654 +10
evaltree 644 654 +10
parse_conf 1440 1444 +4
dpkg_deb_main 426 429 +3
ed_main 3319 3321 +2
passwd_main 2093 2091 -2
kill_main 830 826 -4
singlemount 4609 4601 -8
find_command 962 954 -8
get_lcm 123 105 -18
.rodata 132243 132147 -96
killcmd 449 120 -329
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/7 up/down: 29/-465) Total: -436 bytes
# size busybox_old busybox_unstripped
text data bss dec hex filename
723901 2940 27504 754345 b82a9 busybox_old
723457 2940 27504 753901 b80ed busybox_unstripped
2007-04-29 23:42:54 +00:00
Denis Vlasenko
06af216528
suppress warnings about easch <applet>_main() having
...
no preceding prototype
2007-02-03 17:28:39 +00:00
Denis Vlasenko
150f402b36
whitespace fixes (leading spaces to tab)
2007-01-13 21:06:21 +00:00
Denis Vlasenko
459e4d6cf7
replace /proc scanning code by more versatile one.
...
Use it where appropriate.
Stop scanning /etc/passwd *for every process*!!! (uid->username)
top: reduce memory usage - we won't save unneeded fields
from /proc info anymore. Downside: ~+250 bytes of code
2006-11-05 00:43:51 +00:00
Denis Vlasenko
fa07680091
top: improve CPU% calculation
...
style fixes
2006-11-05 00:38:51 +00:00
Denis Vlasenko
dd539f7687
Unneeded code removed, usused field "unsigned pscpu" removed
2006-11-01 20:20:37 +00:00
Denis Vlasenko
35fb512728
PID should be stored in pid_t, not int or long.
...
find_pid_by_name() was returning 0 or -1 in last array element,
but -1 was never checked. We can use just 0 intead.
2006-11-01 09:16:49 +00:00
Denis Vlasenko
1385899416
attempt to regularize atoi mess.
2006-10-08 12:49:22 +00:00
Denis Vlasenko
8f8f268cfd
bb_applet_name -> applet_name
2006-10-03 21:00:43 +00:00
Denis Vlasenko
0bb628f4f3
kill: implement killall5. OpenWRT folks will be happy.
...
However their code was unusably different from sysvinit original.
Run tested.
2006-09-27 14:25:33 +00:00
Denis Vlasenko
a77947f5bb
kill: fix bugs (kill -l output was horrible), fix style, constify data
2006-09-27 14:19:16 +00:00
Rob Landley
16bbb20089
Random cleanup hanging around my tree.
2006-09-12 20:28:34 +00:00
Rob Landley
c9c1a41c58
A couple things that got tangled up in my tree, easier to check in both than
...
untangle them:
Rewrite u_signal_names() into get_signum() and get_signame(), plus trim the
signal list to that required by posix (they can specify the numbers for
the rest if they really need them). (This is preparatory cleanup for adding
a timeout applet like Roberto Foglietta wants.)
Export the itoa (added due to Denis Vlasenko, although it's not quite his
preferred implementation) from xfuncs.c so it's actually used, and remove
several other redundant implementations of itoa and utoa() in the tree.
2006-07-12 19:17:55 +00:00
Bernhard Reutner-Fischer
e15d7573a1
- move #include busybox.h to the very top so we pull in the config
...
and eventual platform specific includes in early.
2006-06-02 20:56:16 +00:00
Rob Landley
dfba741457
Robert P. Day removed 8 gazillion occurrences of "extern" on function
...
definitions. (That should only be on prototypes.)
2006-03-06 20:47:33 +00:00
"Vladimir N. Oleynik"
1e98a0705b
close bug 638
2006-01-25 13:21:08 +00:00
Tim Riker
c1ef7bdd8d
just whitespace
2006-01-25 00:08:53 +00:00
Mike Frysinger
b92405552f
Jason Schoon writes:
...
Here is a patch for kill that I posted long ago, but forgot about
until today. This allows kill to specify a negative process/group
(such as -1). The shell already had this fix applied by Vodz some
time ago.
2006-01-04 00:13:22 +00:00
Eric Andersen
a4fcccefa6
Patch from Tito adding support for '-q'
2004-08-19 18:26:26 +00:00
Eric Andersen
c7bda1ce65
Remove trailing whitespace. Update copyright to include 2004.
2004-03-15 08:29:22 +00:00
Eric Andersen
8f4ef159f0
Fixup segfault on 'kill -q'
2003-08-06 07:43:58 +00:00
Eric Andersen
7d72e796d6
Rework kill / killall so it behaves itself, even when subjected
...
to abuse.
-Erik
2003-07-26 07:41:56 +00:00
Eric Andersen
cb81e6484d
Update a bunch of docs. Run a script to update my email addr.
2003-07-14 21:21:08 +00:00
Manuel Novoa III
cad5364599
Major coreutils update.
2003-03-19 09:13:01 +00:00
Glenn L McGrath
883d4842d2
Fix compiler warnings, patch by Steven Scholz
2003-02-09 22:40:34 +00:00
Glenn L McGrath
bb2e9d47f3
last_patch_67 from Vladimir N. Oleynik
2002-11-25 22:12:28 +00:00
Eric Andersen
44608e9693
Patch last_pach62 from vodz. This patch moves all the /proc parsing
...
code into libbb so it can be shared by ps, top, etc, saving over 1.5k.
2002-10-22 12:21:15 +00:00
Eric Andersen
c38678d14b
Apply vodz' last_patch52
2002-09-16 06:22:25 +00:00
Eric Andersen
80cd3cfdbc
Fix indentation. Support killall -q, for pcmcia-cs
...
-Erik
2002-07-23 23:45:11 +00:00
Eric Andersen
1d1d2f9b18
Update some missing copyright notices
2002-04-13 08:31:59 +00:00
Matt Kraai
1f0c43668a
Remove == TRUE' tests and convert
!= TRUE' and `== FALSE' tests to use !.
2001-12-20 23:13:26 +00:00
Eric Andersen
b24d65659f
If find_pid_by_name() had an error, it was returning -1, but storing
...
that into a pid_t, which is unsigned on a number archs. Furthermore,
find_pid_by_name() would _never_ return an error if the intended proces
was "init", but instead would return 1, meaning we would fail to work
on 2.4.x kernels running an initrd...
-Erik
2001-12-06 14:52:32 +00:00
Eric Andersen
bdfd0d78bc
Major rework of the directory structure and the entire build system.
...
-Erik
2001-10-24 05:00:29 +00:00
Eric Andersen
3450636169
Latest patch from vodz. Adds a check for divide by zero in the posix
...
math suport, cleaner math syntax error checking, moves redundant signal
string tables (from kill and ash) into libbb and provides a few
cleanups elsewhere.
2001-08-02 05:02:46 +00:00
Eric Andersen
20aab260e2
Some adjustments, mostly from David McCullough <davidm@lineo.com> to
...
make busybox be more uClinux friendly. I also adjusted Config.h for
uClinux so it will automagically disable apps the arn't going to
work without fork() and such.
-Erik
2001-07-19 22:28:02 +00:00
Eric Andersen
8e75f6daa6
Fix a stupid thinko, and fix killall to cope with the updated
...
find_pid_by_name() interface
-Erik
2001-07-05 16:27:34 +00:00
Eric Andersen
3e6ff9017f
A cleanup patch from Jeff Garzik to static-ify a number of
...
namespace polluting things that really should be static.
2001-03-09 21:24:12 +00:00
Eric Andersen
cbe31dace5
It turns out that DODMALLOC was broken when I reorganized busybox.h
...
header file usage before the 0.49 release. To fix it, I had to move
the '#include "busybox.h"' to the end of the list of #include files.
-Erik
2001-02-20 06:14:08 +00:00
Eric Andersen
67991cf824
This patch, put together by Manuel Novoa III, is a merge of work
...
done by Evin Robertson (bug#1105) and work from Manuel to make
usage messages occupy less space and simplify how usage messages
are displayed.
2001-02-14 21:23:06 +00:00
Matt Kraai
dd19c69904
Removed trailing \n from error_msg{,_and_die} messages.
2001-01-31 19:00:21 +00:00
Eric Andersen
ed3ef50c23
Fix header file usage -- there were many unnecessary header files included in
...
busybox.h which slowed compiles. I left only what was needed and then fixed up
all the apps to include their own header files. I also fixed naming for pwd.h
and grp.h functions. Tested to compile and run with libc5, glibc, and uClibc.
-Erik
2001-01-27 08:24:39 +00:00