From owner-freebsd-hackers@freebsd.org Mon Jan 1 16:53:02 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B161EB23A0 for ; Mon, 1 Jan 2018 16:53:02 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D99E7395B for ; Mon, 1 Jan 2018 16:53:02 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w01GqwgL087077; Mon, 1 Jan 2018 08:52:58 -0800 (PST) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w01GqvCx087076; Mon, 1 Jan 2018 08:52:57 -0800 (PST) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201801011652.w01GqvCx087076@pdx.rh.CN85.dnsmgr.net> Subject: Re: Is it considered to be ok to not check the return code of close(2) in base? In-Reply-To: <20180101161817.GF4678@mcvoy.com> To: Larry McVoy Date: Mon, 1 Jan 2018 08:52:57 -0800 (PST) CC: Poul-Henning Kamp , FreeBSD Hackers X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Mailman-Approved-At: Mon, 01 Jan 2018 17:00:03 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 16:53:02 -0000 > On Mon, Jan 01, 2018 at 04:14:33PM +0000, Poul-Henning Kamp wrote: > > But this is bikeshedding at this point anyway. > > +1 Bike shedding is good, people learn things from it. I never knew that assert was altered by NDEBUG for example, thanks for that enlightenment Mark. Didnt even realize that assert had been bastardized by standards, and phk is right, it predates all those things, probably by a decade or more. In summary, given the original question, it would be in the interest of the project to evaluate those close() calls that do not check for errors and do something about it. Either document the intent to intentionally ignore them, or handle the error in some fasion. -- Rod Grimes rgrimes@freebsd.org