Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jan 2014 14:26:40 -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.48752.949231.855028@khavrinen.csail.mit.edu>
In-Reply-To: <20140125041504.Y986@besplex.bde.org>
References:  <20140124014105.GC37334@admin.xzibition.com> <20140124132435.GA90996@stack.nl> <20140124165509.GA73838@admin.xzibition.com> <20140125041504.Y986@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Sat, 25 Jan 2014 06:00:08 +1100 (EST), Bruce Evans <brde@optusnet.com.au> said:

> I don't know how the fd can be invalid for a (necessarily valid) stream.
> Maybe because the fd for a stdio stream is not private, and POSIX actually
> allows closing it directly.  At least this says "shall fail" instead of
> "may fail".  I think the "may fail" for closedir() is just buggy wording.
> The "may" is for the implementation not being required to use fd's at all.
> But when it uses them, errors from them should be "shall fail" like they
> are for fclose().

"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.

-GAWollman




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?21218.48752.949231.855028>