From owner-freebsd-hackers Mon Aug 26 16:41:26 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D8FAE37B417 for ; Mon, 26 Aug 2002 16:41:23 -0700 (PDT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 1720B43E65 for ; Mon, 26 Aug 2002 16:41:23 -0700 (PDT) (envelope-from iedowse@maths.tcd.ie) Received: from gosset.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 27 Aug 2002 00:41:22 +0100 (BST) To: Dominic Marks Cc: freebsd-hackers@freebsd.org Subject: Re: kevent and pipes interaction on 4.6-STABLE In-Reply-To: Your message of "Mon, 26 Aug 2002 23:58:51 BST." <20020826225851.GA93947@gallium> Date: Tue, 27 Aug 2002 00:41:21 +0100 From: Ian Dowse Message-ID: <200208270041.aa72777@salmon.maths.tcd.ie> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20020826225851.GA93947@gallium>, Dominic Marks writes: >+static int kq = -1; >+ int kq, rv, idx; >kevent(0x3,0xbfbfedbc,0x1,0x0,0x0,0x0) = 0 (0x0) >kevent(0x809abc0,0x0,0x0,0xbfbfede0,0x8,0x0) ERR#9 'Bad file descriptor' Look at the above 4 lines, and it is pretty clear what is going on. You don't want to hide the global `kq' behind an uninitialised local variable of the same name. Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message