From owner-freebsd-current Sat Mar 17 12:45:53 2001 Delivered-To: freebsd-current@freebsd.org Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by hub.freebsd.org (Postfix) with ESMTP id 2DE5D37B719; Sat, 17 Mar 2001 12:45:50 -0800 (PST) (envelope-from brdavis@odin.ac.hmc.edu) Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.11.0/8.11.0) id f2HKjfC12392; Sat, 17 Mar 2001 12:45:41 -0800 Date: Sat, 17 Mar 2001 12:45:41 -0800 From: Brooks Davis To: David Malone Cc: Brooks Davis , Alex Zepeda , current@FreeBSD.ORG, mckusick@FreeBSD.ORG Subject: Re: very strange problem with ps Message-ID: <20010317124541.A27339@Odin.AC.HMC.Edu> References: <20010316181229.A16230@Odin.AC.HMC.Edu> <20010316181737.A3151@zippy.mybox.zip> <20010316182146.A17633@Odin.AC.HMC.Edu> <20010317100216.A24957@walton.maths.tcd.ie> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="OXfL5xGRrasGEqWY" Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20010317100216.A24957@walton.maths.tcd.ie>; from dwmalone@maths.tcd.ie on Sat, Mar 17, 2001 at 10:02:16AM +0000 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --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