summaryrefslogtreecommitdiffstats
path: root/lib/libkvm/kvm_proc.c
Commit message (Collapse)AuthorAgeFilesLines
* Adjust for kern.ps_strings and PS_STRINGS not being a pointer. Thisbde1998-12-161-17/+12
| | | | | | | | | | fixes a type mismatch in the call to kvm_uread(). The bug has gone undetected for almost 3 years because kvm_uproc()'s protoype has been disabled for almost 4 years. Trust sysctlbyname() to work properly if it succeeds. Fixed style bugs in revs. 1.19 and 1.22.
* Avoid the "Cannot allocate memory" problem that appears on heavilydes1998-10-121-4/+10
| | | | | | | | | loaded systems by retrying the sysctl() with a larger buffer if it fails with ENOMEM. For good measure, allocate 10% more memory than sysctl() claims is necessary. PR: 8275 Reviewed by: David Greenman <dg@freebsd.org>
* Replace memory leaking instances of realloc with non-leaking reallocf.imp1998-09-161-1/+3
| | | | | | | | | | | In some cases replace if (a == null) a = malloc(x); else a = realloc(a, x); with simple reallocf(a, x). Per ANSI-C, this is guaranteed to be the same thing. I've been running these on my system here w/o ill effects for some time. However, the CTM-express is at part 6 of 34 for the CAM changes, so I've not been able to do a build world with the CAM in the tree with these changes. Shouldn't impact anything, but...
* The length argument to sysctl is now size_t.dfr1998-08-251-2/+4
|
* Allow /dev/null as path for the "/dev/mem" file, and assume that peoplephk1998-06-301-20/+24
| | | | | | | know what they're doing if they do that. This will allow ps to use the kvm_proc.c bits without having access to /dev/mem. Fix kvm_proc.c to not need /dev/mem for access to argv/envp
* Fixed bugs in the conversion of kvm to to use procfs in rev.1.3. Allbde1998-01-161-9/+14
| | | | | | | | | | | | are in kvm_uread(): - the setting of errno before checking it in the lseek() was lost. - EOF handling was lost. kvm_uread() retried forever on EOF. EOF is not really an error, but report it one as in rev.1.2. - reporting of errno after a read error was lost. Fixed style bugs in rev.1.3 and rev.1.12. Not fixed: errno is not reported after lseek() failures.
* Fill in parent process id when reading process information from ategge1997-06-251-0/+12
| | | | memory dump. This fixes one of the problems noted in PR kern/3581.
* General -Wall warning cleanup, part I.jkh1996-07-121-3/+7
| | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu>
* Pass correct length OID to kernel for KERN_PROC_ALL.phk1996-06-061-2/+2
|
* NBPG -> PAGE_SIZEphk1996-05-021-8/+8
|
* From Lite2: proc and file LIST changeshsu1996-03-111-1/+1
|
* If the two recently added sysctl variables exist, use those rather thanpeter1996-02-241-2/+17
| | | | | | | the statically compiled PS_STRINGS and USRSTACK variables. This prevents programs using setproctitle from coredumping if the kernel VM is increased, and stops libkvm users (w, ps, etc) from needing to be recompiled if only the VM layout changes.
* Extract the login name when doing a ps on a dead kernel.peter1996-01-011-0/+2
|
* Cosmetic cleanup and documentation of kvm_argv.. Hopefully the flow ofpeter1995-12-161-6/+65
| | | | the routine can be much more easily understood now... :-)
* Updates to read the extra indirection in ps_strings. Note that anypeter1995-12-091-35/+52
| | | | | | | static executables that depend on this will need to be relinked (ie: do this before 'ps'), but the dynamic linked stuff should be OK (ie: 'w') Obtained from: NetBSD (not much point reinventing the wheel.. :-)
* Remove trailing whitespace.rgrimes1995-05-301-12/+12
|
* Cast the offset of one call to lseek() to off_t, as it's already donejoerg1995-03-191-1/+1
| | | | | | | | in all other places here. This is a hack, the interface should be changed to use off_t's everywhere around, but this will require to update all the programs that happen to use libkvm.
* Remove some unused variables and fix two blatant core dump triggers.phk1995-02-241-3/+1
|
* Fix from Gary Jennejohn - use 'cp' not 'buf' in read call. Oops.dg1994-11-021-1/+1
|
* Added spare space on the usr stack. Used in ibcs2 emulation.sos1994-10-091-2/+2
|
* Made kvm routines use procfs to get out process data such as argumentdg1994-08-111-129/+33
| | | | strings.
* Fix kvm_i386.c just enough to make it compile and return lots of errorsrgrimes1994-05-281-0/+6
| | | | | when called. Noop out swapread in kvm_proc.c as our vm system is different.
* BSD 4.4 Lite Lib Sourcesrgrimes1994-05-271-0/+705
OpenPOWER on IntegriCloud