summaryrefslogtreecommitdiffstats
path: root/bin/ps
Commit message (Collapse)AuthorAgeFilesLines
* Rename new PLONG type to PGTOK as the conversion is more important than thejmallett2002-09-173-4/+4
| | | | | | size (which is mostly undefined anyway). Submitted by: bde
* Conglomerate printing of ps_pgtok'd data into a PLONG type. I couldn't thinkjmallett2002-09-174-23/+6
| | | | | of a better name, except PINT, but I decided to go with assuming LONG to be safe, rather than assuming INT.
* Perform keyword.c:1.27 properly, implement -orss in the New World Order ofjmallett2002-09-163-2/+12
| | | | | | | | ps(1) formatting, using pgtok() to get the value in K, rather than printing it in pages. This is consistent with behaviour before keyword.c:1.26 (et al) which exists in STABLE today, and which uses the same metric as VSZ. Submitted by: bde
* Remove some NOTINUSE stuff. Good housekeeping.jmallett2002-09-161-9/+0
|
* Do not risk using the kernel pgtok() which assumes the page size ispeter2002-09-131-6/+2
| | | | constant.
* Prevent ps(1) from doing idiotic munging of things in a -ofmt= string.jmallett2002-09-031-1/+8
| | | | God I hate the backwards compatability crap here.
* s/filesystem/file system/ as discussed on -developerstrhodes2002-08-211-1/+1
|
* mdoc(7) police: whitespace nits.ru2002-08-091-2/+3
|
* Fixed a printf format error that was fatal on alphas. Adding WFORMAT=0bde2002-07-111-2/+1
| | | | | | | | to the Makefile didn't affect this bug because WFORMAT only controls higher- level format checking (not the -Wformat that is implicit in -Wall). Fixed a nearby printf format error that was benign and 3 nearby style bugs.
* err() is documented as allowing NULL for the format string but GCC isn'tdillon2002-07-101-1/+1
| | | | happy about it any more so change the usage to make buildworld work again.
* Bring back WFORMAT=0.jmallett2002-07-081-0/+1
|
* - Use (MAXLOGNAME - 1) where UT_NAMESIZE was used to be able torobert2002-07-082-4/+2
| | | | (-)remove the inclusions of <utmp.h>.
* Make printval() take a 'void *' thus negating any assumptions the compilerjmallett2002-07-071-2/+2
| | | | may try to make about the alignment of the dereferenced datum.
* Don't depend on pollution in <limits.h> for the definition ofmike2002-07-051-0/+1
| | | | <stdint.h> macros.
* Consistently use FBSDIDobrien2002-06-306-20/+10
|
* Don't try to decode old-style options if the argv[1] begins with `-' and thesobomax2002-06-201-10/+28
| | | | | | | | | | | | | second character represents some option taking an argument. This fixes problem when ps(1) is invoked for examply as follows: $ ps -Ufoobar1234 the above example results in option string being interpreted as -U foobarp1234 - note extra `p'. Reported by: Vladimir Sotnikov <vovan@kyivstar.net> MFC after: 2 weeks
* ps(1) appeared in v4jmallett2002-06-101-1/+1
| | | | Submitted by: grog
* Note early appearence of some commands. These actually appeared in PWB, butjmallett2002-06-101-0/+5
| | | | | it seems we don't have a macro for that yet, so list them in the first UNIX release since then that we have a .At for: v7.
* Allow whitespace to act as a delimiter in the keywords list given to the -o,jmallett2002-06-082-5/+14
| | | | | | | | again, but also allow it in the user-specified header, too. This is far more backwards compatible and SUSv3-happy than allowing only comma to seperate the keywords list. Submitted by: tjr
* Fixed unsorting.bde2002-06-081-1/+1
|
* Don't say that the list of formats can be space delimited, it no longer can be.jmallett2002-06-081-2/+5
| | | | | | Mention that more than one -o will concatenate formats. Submitted by: Jun Kuriyama <kuriyama@imgsrc.co.jp>
* Back out previous back out of previously correct code.jmallett2002-06-071-2/+1
| | | | | Double-plus-pointy-hat to: jmallett Submitted by: bde
* Remove tunables to hide warnings that no longer exist.jmallett2002-06-071-2/+0
|
* Cast to long to match format. Hidden by revision 1.18 of Makefile.jmallett2002-06-071-1/+2
|
* Use a global `now' variable for the current time, and initialise it atjmallett2002-06-063-6/+5
| | | | startup, right after calling setlocale(3).
* Implement a SUSv3-ignorant but "time"-similar format for "etime", elapsedjmallett2002-06-064-0/+21
| | | | | run time (NOT cpu time). cputime() and elapsed() both need to honour SUSv3 now.
* sysctlbyname(3) returns -1 on failure, not any other value < 0.jmallett2002-06-061-3/+3
|
* Support the SUSv3 `rgroup' format.jmallett2002-06-064-5/+24
| | | | Clean up some local style bogons.
* Cast arg_max to size_t when comparing it (times 4, plus 1) against SIZE_MAX. Ijmallett2002-06-061-1/+2
| | | | | | | | was worried about truncation of arg_max by this cast, but if it gets truncated, we know it'll obviously be greater than SIZE_MAX anyway. Big pointy hat to: jmallett Submitted by: keramida
* SUSv3 conform on the "comm" and "args" formats, and make correct the "command"jmallett2002-06-064-4/+41
| | | | format, since it's BSDlike, and "comm" is actually different.
* Refer to the command format by its SUSv3 name (comm), and list command as anjmallett2002-06-061-2/+2
| | | | alias.
* As per behaviour on SVR4 systems, to allow any desirable type of header in thejmallett2002-06-061-2/+4
| | | | | | | | | | | | | | | | override, seperate by comma (',') only, rather than any type of whitespace (the literal space character (' ') had already been removed from this list). This allows things like: miamivice# ps -opid='Process > Identifier' Process Identifier 1350 1445 1450 To work.
* Widen the scope of fmt.c::1.19 and consistently use errx(3) if malloc(3) [orjmallett2002-06-053-10/+8
| | | | | | | | | | realloc(3)] happens to fail, everywhere in ps(1). Discussed with: bde, charnier (a while ago) fmt_argv() can no longer return NULL, so don't bother checking. Submitted by: bde
* Comma seperate format lists, since space is no longer up to the task.jmallett2002-06-051-6/+6
| | | | | Poked by: David Wolfskill <david@catwhisker.org> Pointy hat to: jmallett
* Support the 'comm' keyword, which is equivalent to our 'command', butjmallett2002-06-051-0/+2
| | | | specified by SUSv3.
* A space cannot be a header string seperator it appears given the SUSv3jmallett2002-06-051-1/+1
| | | | | description of ps(1), which uses them. I question whether newline and tab can be either, but I'm not touching them. Yet.
* To comply with SUSv3, duplicate the variable contents for each given format,jmallett2002-06-051-1/+4
| | | | | | | | | | | | so that multiple -ovar=header lines do not overwrite eachother. This means that ps -ouser=USERNAME -ouser=WHO would now possibly print: USERNAME WHO juli juli Whereas before it would be: WHO WHO juli juli
* Returning NULL here if malloc(3) fails is silly, at this point in the codepathjmallett2002-06-051-1/+1
| | | | | we have't malloc(3)'d nearly as much as we probably will, so errx(3) away, instead of waiting for something to fail yet again later on.
* Remove an XXX comment that seems to be a tiny bit no longer pertinent. Thisjmallett2002-06-051-4/+0
| | | | | | function seems to do the right thing, and is not a "stub", and whoever "marc" is, he's had plenty of time to do "the real one", so don't wait around for him any longer.
* Use of zero here meant many things, NULL, '\0' (NUL), and 0. Sort it out.jmallett2002-06-051-5/+5
|
* Use a const char * where it is meant to be used. There's no reason to tryjmallett2002-06-051-1/+2
| | | | to discard the const qualifier here.
* Duplicate the pointer to the string containing the header so it does not getjmallett2002-06-051-1/+1
| | | | frobbed when/if the pointer it is actually a part of gets freed.
* Respect setting of the COLUMNS environment variable (SUSv3)tjr2002-06-042-1/+14
|
* The sysctl has changed from 'kern.ps_showallprocs' tojoe2002-05-161-1/+1
| | | | 'security.bsd.see_other_uids'.
* Consistancy check s/file system/filesystem/trhodes2002-05-161-1/+1
| | | | Reviewed by: brian
* Replace /kernel with /boot/kernel/kernel.joe2002-05-091-2/+2
| | | | | PR: docs/37757 Submitted by: Hiten Pandya <hiten@uk.FreeBSD.org>
* Check for possible overflow from sysconf _SC_ARG_MAX and error out in ajmallett2002-05-051-5/+10
| | | | | | | | | | | | | | | correct manner. Revert my incorrect change to use err(3) for malloc(3) failing. Use a size_t variable to store the size of the argument buffer we allocate, and remove silly casts as the result of having this around. Modify the math in some of the paranoid checks for buffer overflow to account for the fact we now are dealing with the actual size of the buffer. Remove the static qualifier for arg_max, and the bogus setting of it to -1. Include <limits.h> for the definitions we use to check for possible overflows. Submitted by: bde
* Don't cast incorrectly to malloc(3), and don't use errx(3) if malloc(3)jmallett2002-05-021-2/+2
| | | | returns NULL, as malloc(3) sets errno. Use err(3).
* Use `The .Nm utility'charnier2002-04-161-2/+6
|
* errx()/strerror() -> err()jedgar2002-04-071-2/+2
|
OpenPOWER on IntegriCloud