]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r230873:
authortrociny <trociny@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 12 Feb 2012 07:53:02 +0000 (07:53 +0000)
committertrociny <trociny@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 12 Feb 2012 07:53:02 +0000 (07:53 +0000)
commitae4994884c1d943c3089a6546ed9333424b09368
tree5ba5b75a56b84dec682cbf6c97f48c543bf9aca6
parente2f4648ec101d76b17b421f01464303151185aa3
MFC r230873:

Try to avoid ambiguity when sysctl returns ENOMEM additionally
checking the returned oldlen: when ENOMEM is due to the supplied
buffer being too short the return oldlen is equal to buffer size.

Without this additional check kvm_getprocs() gets stuck in loop if the
returned ENOMEM was due the exceeded memorylocked limit. This is
easily can be observed running `limits -l 1k top'.

Submitted by: Andrey Zonov <andrey zonov org>

git-svn-id: svn://svn.freebsd.org/base/stable/8@231551 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libkvm/kvm_proc.c