Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Mar 2001 12:45:41 -0800
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        David Malone <dwmalone@maths.tcd.ie>
Cc:        Brooks Davis <brooks@one-eyed-alien.net>, Alex Zepeda <jazepeda@pacbell.net>, current@FreeBSD.ORG, mckusick@FreeBSD.ORG
Subject:   Re: very strange problem with ps
Message-ID:  <20010317124541.A27339@Odin.AC.HMC.Edu>
In-Reply-To: <20010317100216.A24957@walton.maths.tcd.ie>; from dwmalone@maths.tcd.ie on Sat, Mar 17, 2001 at 10:02:16AM %2B0000
References:  <20010316181229.A16230@Odin.AC.HMC.Edu> <20010316181737.A3151@zippy.mybox.zip> <20010316182146.A17633@Odin.AC.HMC.Edu> <20010317100216.A24957@walton.maths.tcd.ie>

next in thread | previous in thread | raw e-mail | index | archive | help

--OXfL5xGRrasGEqWY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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.
>=20
> 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.

-- Brooks

--
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

--OXfL5xGRrasGEqWY
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6s8z0XY6L6fI4GtQRAtFvAJ41O0Q0KOoEjoRBI59Dw/qsA41bPwCeNu/r
atnjlcbQwUkdYCrVQeiye6I=
=abal
-----END PGP SIGNATURE-----

--OXfL5xGRrasGEqWY--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010317124541.A27339>