Age | Commit message (Collapse) | Author |
|
|
|
Exit immediately if we don't actually have anything to -f --- it's -f's
big brother -F that retries by name rather than by fd.
|
|
You can't pass a NULL value to setenv(3). The "put things back how they were"
intent of this code is best achieved by calling unsetenv(3) in the NULL case.
(This causes a crash with "hwclock -u" on Android. glibc silently corrupts the
environment instead.)
|
|
Some things are worse when you remove the 'p'.
|
|
|
|
Commit 4b4ab6a50998 broke loopfiles' handling of "-".
This broke the existing cat tests, so no new test is necessary here.
|
|
|
|
add function key definitions and shift/ctrl/alt cursor keys.
|
|
checking, and fix up format checking complaints.
Added out(type, value) function to stat to avoid a zillion printf typecasts.
|
|
|
|
(not finished yet) plus some error message improvements.
|
|
|
|
The segfault was spotted/fixed by Daniel K. Levy back in September, and again by
Isabella Parakiss yesterday. While we're there, remove the environment
size measurement code (the 128k limit was lifted by linux commit b6a2fea39318,
which went into 2.6.22 released July 2007).
|
|
Lotsa TODOs: Currently exit it with ctrl-c, not q.
Doesn't show totals, PID instead ofTID, PR instead of PRIO (type/pri),
human_readable can't display fixed point, IO isn't a percentage,
COMM instead of COMMAND (so no [kernelthread] brackets), and no
cursor left/right to change sort field...
|
|
|
|
"mktemp -u > /dev/full" leave file around.
|
|
The -u flag creates a file, and unlinks it before exiting.
This is usually known as "unsafe mode", or "dry-run" mode.
GNU mktemp has it, as does Busybox's mktemp and likely many others.
|
|
corresponding percentile fields to ps. Move FLAG_ macro usage to ps-specific
code (top/iotop have their own flag contexts). Split init and match code
into shared and ps-specific parts. Fix bug in COMMAND for privileged processes.
|
|
|
|
|
|
(Oops. Missed a file checkin, build break, my bad.)
|
|
|
|
|
|
(Moved header a while ago, forgot to check in function move.)
|
|
and add test_scankey.
|
|
|
|
|
|
|
|
|
|
|
|
on files opened read-only, so revert last commit (force writeable logic).
|
|
These three are currently available in Android's ps but not in toybox ps.
|
|
|
|
|
|
|
|
(leading underscore version is 1<<NAME_TAG version, with 1LL for >31 shift),
suck lots of magic constants out of ps and use tag macros instead,
redo command line display so there's now 6 variants (CMD COMM ARGS from posix,
NAME CMDLINE from android, and COMMAND for completeness). Document more
cases where posix is nuts or widely ignored.
|
|
|
|
This lets you have struct arrays with a string as the first member, ala:
struct {char *name; int x, y} blah thingy[] = TAGGED_ARRAY(BLAH,
{"one", 1, 2}, {"two", 3, 4}, {"three", 5, 6}
);
And it produces #defines for the array index of each, ala:
#define BLAH_one 0
#define BLAH_two 1
#define BLAH_three 2
So you can use thingy[BLAH_two].x and still reorder the elements at will.
Note: if you screw up the array initializers, temporarily replace
TAGGED_ARRAY(BLAH, with { and the ); with }; and the compiler will give you
better error messages. (With the macro the compiler reports errors on the
TAGGED_ARRAY line, not where the comma is missing in its contents.)
Currently the TAGGED_ARRAY( and ); must be on their own lines, and the
{ and start of each attached string must be on the same line.
|
|
and slot numers into a structure. (Keeping multiple arrays in sync may have
been efficient but it was ugly.) Fix duplicate command name copying that
corrupted the name of kernel threads. Tighten up slot[] docs.
|
|
Valgrind complains that we add uninitalized memory to totals[] fields we never
read from. (If we didn't set it in entrylen() we don't use it during display,
they're testing the same flags), but valgrind doesn't understand that.
|
|
out.
Keep the low 32 bits of FLAG_x constants as 32 bit numbers so that at least
on little endian platforms it's still normal 32 bit math outside of lib/args.c.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Includes tests for the new feature, and a failure case for the minimal
perms test as well.
Also some typo fixing / massaging the help text so it fits in 80
columns.
|
|
|
|
move slot[] documentation into C code, add PR %VSZ VIRT RES SHR
|