From owner-freebsd-stable@FreeBSD.ORG Wed May 25 01:30:52 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C3C6816A41C for ; Wed, 25 May 2005 01:30:52 +0000 (GMT) (envelope-from emaste@phaedrus.sandvine.ca) Received: from mailserver.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08B1343D49 for ; Wed, 25 May 2005 01:30:51 +0000 (GMT) (envelope-from emaste@phaedrus.sandvine.ca) Received: from labgw2.phaedrus.sandvine.com ([192.168.3.11]) by mailserver.sandvine.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 24 May 2005 21:30:48 -0400 Received: by labgw2.phaedrus.sandvine.com (Postfix, from userid 12627) id D1EC01360A; Tue, 24 May 2005 21:30:50 -0400 (EDT) Date: Tue, 24 May 2005 21:30:50 -0400 From: Ed Maste To: freebsd-stable@freebsd.org Message-ID: <20050525013050.GC35718@sandvine.com> References: <20050524165907.GA20674@sandvine.com> <20050524173648.GA29183@sandvine.com> <20050524215153.GA35718@sandvine.com> <20050524230131.GN959@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050524230131.GN959@funkthat.com> User-Agent: Mutt/1.4.2.1i X-OriginalArrivalTime: 25 May 2005 01:30:48.0951 (UTC) FILETIME=[61727070:01C560C9] Subject: Re: libc_r kqueue fd leak X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2005 01:30:52 -0000 On Tue, May 24, 2005 at 04:01:31PM -0700, John-Mark Gurney wrote: > yes, the reason I made _stat return ENXIO is that _read and _write are > not supported by kqueue, and so _stat provided useless information. > When I added locking, it would only be reading a value that would > immediately be able to be changed, making it informational at best.. > You'd better spend your syscall calling kevent and getting a few > events off the queue than trying to figure out how much work you > have to do... (In one of my programs, I have code that dynamicly > increases the number of kevent structs I pull off if I get the max..) > > After being pestered by ps, I have created a patch.. after a quick test > that it compiles and runs, I'll commit it... Though libc_r depending > upon _stat seems broken to me... Who knows what else doesn't implement > _stat and can't be closed.. Thanks for committing that. I agree that it's goofy for libc_r to depend on stat, hence the libc_r uthread_close patch I posted. Unfortunately that would require a 4.x libc_r for compat too. -ed