Date: Fri, 24 Jan 2014 15:28:12 -0500 From: Garrett Wollman <wollman@csail.mit.edu> To: Bruce Evans <brde@optusnet.com.au> Cc: freebsd-standards@freebsd.org Subject: Re: closedir(3) handling NULL Message-ID: <21218.52444.765847.64846@khavrinen.csail.mit.edu> In-Reply-To: <20140125065355.P1644@besplex.bde.org> References: <20140124014105.GC37334@admin.xzibition.com> <20140124132435.GA90996@stack.nl> <20140124165509.GA73838@admin.xzibition.com> <20140125041504.Y986@besplex.bde.org> <21218.48752.949231.855028@khavrinen.csail.mit.edu> <20140125065355.P1644@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
<<On Sat, 25 Jan 2014 07:08:33 +1100 (EST), Bruce Evans <brde@optusnet.com.au> said: > On Fri, 24 Jan 2014, Garrett Wollman wrote: >> "may fail" has a very specific meaning in the "ERRORS" section: if the >> implementation detects the condition described, it must use the >> specified error number. > That doesn't quite do it. Detection of the error for closing a closed fd > is still not required, unlike for fclose(). That is correct. If the implementation detects this condition and returns an error, it must indicate [EBADF]. But it need not detect that condition, even if that will prevent it from performing the function, and in that case, the function's behavior is unspecified. Since there are no "shall"s involved, no conformance distinction can be made between two implementations, one of which detects an invalid stream and indicates [EBADF], and the other of which does not detect an invalid stream but turns your computer into a frog. -GAWollman
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?21218.52444.765847.64846>