Page MenuHomeFreeBSD

libc: Improve POSIX conformance of dirfd()
ClosedPublic

Authored by des on Sat, Jan 31, 9:34 PM.
Tags
None
Referenced Files
F143980359: D55025.id170986.diff
Mon, Feb 2, 9:53 PM
F143969474: D55025.id170986.diff
Mon, Feb 2, 6:06 PM
Unknown Object (File)
Sun, Feb 1, 9:32 AM
Unknown Object (File)
Sun, Feb 1, 4:40 AM
Unknown Object (File)
Sun, Feb 1, 2:25 AM
Unknown Object (File)
Sun, Feb 1, 12:16 AM
Unknown Object (File)
Sat, Jan 31, 11:59 PM
Unknown Object (File)
Sat, Jan 31, 10:31 PM
Subscribers

Details

Summary

POSIX states that dirfd() should set errno to EINVAL and return -1 if
dirp does not refer to a valid directory stream. Our interpretation is
that this applies if dirp is null or the file descriptor associated
with it is negative.

MFC after: 1 week
Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable