From owner-freebsd-current@FreeBSD.ORG Tue Aug 19 10:12:03 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1948E16A4BF for ; Tue, 19 Aug 2003 10:12:03 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1AEE43FDF for ; Tue, 19 Aug 2003 10:12:01 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id h7JHBvrp087593; Tue, 19 Aug 2003 12:11:57 -0500 (CDT) (envelope-from dan) Date: Tue, 19 Aug 2003 12:11:57 -0500 From: Dan Nelson To: Andre Guibert de Bruet Message-ID: <20030819171155.GC5141@dan.emsphone.com> References: <20030819110750.Q452@alpha.siliconlandmark.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030819110750.Q452@alpha.siliconlandmark.com> X-OS: FreeBSD 5.1-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i cc: current@freebsd.org Subject: Re: fwcontrol -r missing a close() call X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Tue, 19 Aug 2003 17:12:03 -0000 In the last episode (Aug 19), Andre Guibert de Bruet said: > open("/dev/fw0.0",0x2,01001132500) = 3 (0x3) > ioctl(3,FW_IBUSRST,0xbfbff400) = 0 (0x0) > exit(0x0) > process exit, rval = 0 > > We're not closing fd #3 before exiting the process. This is also the case > with 4.8-STABLE. > > Semantics? Nit-picking? Both? :) Why bother closing a fd when exit() will do it for you? You don't close stdout when you're done with it :) -- Dan Nelson dnelson@allantgroup.com