trociny bd849a2aad 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>
MFC after:	1 week
2012-02-01 18:02:13 +00:00
..
2011-12-13 14:53:26 +00:00
2011-11-18 09:56:40 +00:00
2011-09-28 14:52:25 +00:00
2011-12-30 10:45:00 +00:00