From owner-cvs-all Wed May 2 17:58:52 2001 Delivered-To: cvs-all@freebsd.org Received: from freesbee.wheel.dk (freesbee.wheel.dk [193.162.159.97]) by hub.freebsd.org (Postfix) with ESMTP id 0A2CD37B43C; Wed, 2 May 2001 17:58:45 -0700 (PDT) (envelope-from ncbp@bank-pedersen.dk) Received: by freesbee.wheel.dk (Postfix, from userid 1002) id 16C4C5D60; Thu, 3 May 2001 02:58:48 +0200 (CEST) Date: Thu, 3 May 2001 02:58:48 +0200 From: "Niels Chr. Bank-Pedersen" To: David Malone Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libkvm kvm_proc.c Message-ID: <20010503025847.L17327@bank-pedersen.dk> Mail-Followup-To: "Niels Chr. Bank-Pedersen" , David Malone , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org References: <200105011034.f41AYGQ01813@freefall.freebsd.org> <20010502004226.K17327@bank-pedersen.dk> <20010502094117.A20469@walton.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010502094117.A20469@walton.maths.tcd.ie>; from dwmalone@maths.tcd.ie on Wed, May 02, 2001 at 09:41:17AM +0100 X-PGP-Fingerprint: 18D0 73F3 767F 3A40 CEBA C595 4783 D7F5 5DD1 FB8C X-PGP-Public-Key: http://freesbee.wheel.dk/~ncbp/gpgkey.pub Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, May 02, 2001 at 09:41:17AM +0100, David Malone wrote: > On Wed, May 02, 2001 at 12:42:27AM +0200, Niels Chr. Bank-Pedersen wrote: > > Removing the check for size=0 fixes kvm_getprocs in the > > case, but unfortunately causes > > a coredump when the caller requests a nonexisting PID: > > > > note% ps -p 1234 > > Floating exception (core dumped) > > > > Don't know how this should be fixed, though. > > I don't see that on a patched machine here: > > > ps -p 1234 > PID TT STAT TIME COMMAND > > and it works OK on existing processes too: > > > ps -p $$ > PID TT STAT TIME COMMAND > 42862 p0 DWs 0:00.20 -tcsh (tcsh) > > can you do some more experimentation and see if you can figure out > what's going on? (I presume you know that you need to recompile ps > after recompiling libkvm 'cos ps is statically linked). Hmm, I guess I asked for trouble: note# ls -l /etc/malloc.conf lrwxr-xr-x 1 root wheel 2 3 Maj 02:55 /etc/malloc.conf -> aj note# ps -p 1234 Floating exception (core dumped) note# rm /etc/malloc.conf note# ps -p 1234 PID TT STAT TIME COMMAND note# > David. /Niels Chr. -- Niels Christian Bank-Pedersen, NCB1-RIPE. Network Manager, TDC, IP-section. "Hey, are any of you guys out there actually *using* RFC 2549?" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message