From owner-freebsd-current@FreeBSD.ORG Sun Aug 23 20:13:43 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF21D106568C for ; Sun, 23 Aug 2009 20:13:43 +0000 (UTC) (envelope-from nslay@comcast.net) Received: from QMTA08.emeryville.ca.mail.comcast.net (qmta08.emeryville.ca.mail.comcast.net [76.96.30.80]) by mx1.freebsd.org (Postfix) with ESMTP id A7CCB8FC12 for ; Sun, 23 Aug 2009 20:13:43 +0000 (UTC) Received: from OMTA04.emeryville.ca.mail.comcast.net ([76.96.30.35]) by QMTA08.emeryville.ca.mail.comcast.net with comcast id Xvum1c0040lTkoCA8wDk8B; Sun, 23 Aug 2009 20:13:44 +0000 Received: from LIGHTBULB.LOCAL ([69.244.210.117]) by OMTA04.emeryville.ca.mail.comcast.net with comcast id XwDi1c0012YXfpR8QwDj0r; Sun, 23 Aug 2009 20:13:44 +0000 Message-ID: <4A91A2A2.9000004@comcast.net> Date: Sun, 23 Aug 2009 16:12:18 -0400 From: Nathan Lay User-Agent: Thunderbird 2.0.0.22 (X11/20090626) MIME-Version: 1.0 To: Ed Schouten References: <20090822185812.GC61707@felucia.tataz.chchile.org> <20090822194009.GQ1292@hoeg.nl> <4A90C099.8030605@comcast.net> <20090823065058.GR1292@hoeg.nl> In-Reply-To: <20090823065058.GR1292@hoeg.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org, Jeremie Le Hen Subject: Re: truss(1) locked in kernel with 8.0-BETA2 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Aug 2009 20:13:43 -0000 Ed Schouten wrote: > * Nathan Lay wrote: > >> Instead of zeroing and setting master and STDIN_FILENO on the fd_set >> every iteration, >> > > The current code doesn't zero the fdsets each iteration, only during > startup: > > | FD_ZERO(&rfd); > | for (;;) { > | FD_SET(master, &rfd); > | if (!nostdin) > | FD_SET(STDIN_FILENO, &rfd); > > Ah right, I misread. In any case, once 0 bytes are written to the master descriptor is that continually needed and does select() really need to continue to examine STDIN_FILENO?