Mikolaj Golub 767993ec97 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-01-23 11:08:28 +00:00
2011-01-23 11:08:28 +00:00
2011-01-23 11:08:28 +00:00
2011-01-23 11:08:28 +00:00
2011-01-23 11:08:28 +00:00
2011-01-23 11:08:28 +00:00
2011-01-23 11:08:28 +00:00
2011-01-23 11:08:28 +00:00
2011-01-23 11:08:28 +00:00
2011-01-23 11:08:28 +00:00
2011-01-23 11:08:28 +00:00
2011-01-23 11:08:28 +00:00
2011-01-23 11:08:28 +00:00
2011-01-23 11:08:28 +00:00
2011-01-23 11:08:28 +00:00