On Sat, Mar 17, 2001 at 10:02:16AM +0000, David Malone wrote:
> On Fri, Mar 16, 2001 at 06:21:46PM -0800, Brooks Davis wrote:
> > Ah, you are correct. I should have tried that. What a strange bug.
> It happens for any option which causes the sysctl to return no
> processes to libkvm. (Try ps -p 100000). I think the following
> patch should fix the problem.
I think that should do it. I was testing a slightly different fix,
but that one looks clearner. Part of the problem is that kvm_getprocs
has a completly stupid API. Since it's reasionable that you could get
no entries from your query, you damn well should be able to return the
appropriate pointer (NULL) but someone wasn't thinking very hard
and NULL is the error condition.
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4