summaryrefslogtreecommitdiff
path: root/lib/libkvm/kvm_proc.c
Commit message (Collapse)AuthorAgeFilesLines
* Adjust for kern.ps_strings and PS_STRINGS not being a pointer. ThisBruce Evans1998-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. Notes: svn path=/head/; revision=41880
* Avoid the "Cannot allocate memory" problem that appears on heavilyDag-Erling Smørgrav1998-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> Notes: svn path=/head/; revision=40268
* Replace memory leaking instances of realloc with non-leaking reallocf.Warner Losh1998-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... Notes: svn path=/head/; revision=39327
* The length argument to sysctl is now size_t.Doug Rabson1998-08-251-2/+4
| | | | Notes: svn path=/head/; revision=38534
* Allow /dev/null as path for the "/dev/mem" file, and assume that peoplePoul-Henning Kamp1998-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 Notes: svn path=/head/; revision=37316
* Fixed bugs in the conversion of kvm to to use procfs in rev.1.3. AllBruce Evans1998-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. Notes: svn path=/head/; revision=32568
* Fill in parent process id when reading process information from aTor Egge1997-06-251-0/+12
| | | | | | | memory dump. This fixes one of the problems noted in PR kern/3581. Notes: svn path=/head/; revision=26947
* General -Wall warning cleanup, part I.Jordan K. Hubbard1996-07-121-3/+7
| | | | | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu> Notes: svn path=/head/; revision=17141
* Pass correct length OID to kernel for KERN_PROC_ALL.Poul-Henning Kamp1996-06-061-2/+2
| | | | Notes: svn path=/head/; revision=16158
* NBPG -> PAGE_SIZEPoul-Henning Kamp1996-05-021-8/+8
| | | | Notes: svn path=/head/; revision=15533
* From Lite2: proc and file LIST changesJeffrey Hsu1996-03-111-1/+1
| | | | Notes: svn path=/head/; revision=14523
* If the two recently added sysctl variables exist, use those rather thanPeter Wemm1996-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. Notes: svn path=/head/; revision=14236
* Extract the login name when doing a ps on a dead kernel.Peter Wemm1996-01-011-0/+2
| | | | Notes: svn path=/head/; revision=13156
* Cosmetic cleanup and documentation of kvm_argv.. Hopefully the flow ofPeter Wemm1995-12-161-6/+65
| | | | | | | the routine can be much more easily understood now... :-) Notes: svn path=/head/; revision=12885
* Updates to read the extra indirection in ps_strings. Note that anyPeter Wemm1995-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.. :-) Notes: svn path=/head/; revision=12682
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-12/+12
| | | | Notes: svn path=/head/; revision=8870
* Cast the offset of one call to lseek() to off_t, as it's already doneJoerg Wunsch1995-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. Notes: svn path=/head/; revision=7166
* Remove some unused variables and fix two blatant core dump triggers.Poul-Henning Kamp1995-02-241-3/+1
| | | | Notes: svn path=/head/; revision=6683
* Fix from Gary Jennejohn - use 'cp' not 'buf' in read call. Oops.David Greenman1994-11-021-1/+1
| | | | Notes: svn path=/head/; revision=4095
* Added spare space on the usr stack. Used in ibcs2 emulation.Søren Schmidt1994-10-091-2/+2
| | | | Notes: svn path=/head/; revision=3477
* Made kvm routines use procfs to get out process data such as argumentDavid Greenman1994-08-111-129/+33
| | | | | | | strings. Notes: svn path=/head/; revision=2029
* Fix kvm_i386.c just enough to make it compile and return lots of errorsRodney W. Grimes1994-05-281-0/+6
| | | | | | | | when called. Noop out swapread in kvm_proc.c as our vm system is different. Notes: svn path=/head/; revision=1603
* BSD 4.4 Lite Lib SourcesRodney W. Grimes1994-05-271-0/+705
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573