Date: Fri, 24 Jan 2014 13:08:55 -0500 From: Garrett Wollman <wollman@csail.mit.edu> To: Bryan Drewery <bryan@shatow.net> Cc: freebsd-standards@FreeBSD.org Subject: Re: closedir(3) handling NULL Message-ID: <21218.44087.838181.110669@khavrinen.csail.mit.edu> In-Reply-To: <20140124165509.GA73838@admin.xzibition.com> References: <20140124014105.GC37334@admin.xzibition.com> <20140124132435.GA90996@stack.nl> <20140124165509.GA73838@admin.xzibition.com>
next in thread | previous in thread | raw e-mail | index | archive | help
<<On Fri, 24 Jan 2014 10:55:09 -0600, Bryan Drewery <bryan@shatow.net> said: > I'm not clear where you stand on this. Is EINVAL more proper or EBADF, > or are you against the change all together? If you pass a null pointer to a function that does not expect one, the result is undefined. If the process is not terminated, its state (including errno and any register or memory contents) may be set to any value whatsoever. If it were me, and I for some reason wanted to check this corner case explicitly, I'd use [EFAULT]. -GAWollman
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?21218.44087.838181.110669>