closedir(3) handling NULL

Bryan Drewery bryan at shatow.net
Fri Jan 24 01:41:13 UTC 2014


Hi,

Please review. I would like to commit this.

I found that Linux handles closedir(NULL) fine and returns EINVAL. POSIX
[1] specifies that EBADF should be returned if "The dirp argument does
not refer to an open directory stream"

[1] http://pubs.opengroup.org/onlinepubs/009696799/functions/closedir.html

I've updated fdclosedir(3) as well to behave the same.

I'll also update the manpage if there is no objection.

Thanks,
Bryan Drewery
-------------- next part --------------
A non-text attachment was scrubbed...
Name: closedir-NULL.diff
Type: text/x-diff
Size: 722 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-standards/attachments/20140123/64121cb6/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 964 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-standards/attachments/20140123/64121cb6/attachment.sig>


More information about the freebsd-standards mailing list