>Note that POSIX requires that if opendir() is based on file descriptors
>(doesn't necessarily have to be), the file descriptor would be closed
>on exec.  Perhaps someone needs to get clarification whether the intent
>will be for the added dirfd() to also do that; if so, a simple implementation
>would be fine (but the documentation should point out that dirfd() would
>only be valid as long as the DIR* it was derived from was valid), otherwise 
>there would be other problems.  One not necessarily standard description
>of dirfd I saw said that if opendir() wasn't implemented based on file
>descriptors, dirfd() could return -1; but that may still be up for discussion
>with the Austin Group folks; I can't get to the opengroup.org web site
>right now to check.  Someone around here (Don Cragun?) has regular
>contact with them, and may be able to get enough clarification that
>it can be done with maximum confidence that it will match their final
>version (or tell you that they're not at that point yet).

Clearly, if opendir() is not based on file descriptors, then dirfd() will
need to fail....

(And I would expect the file descriptor to remain to be closed on exec)

Casper

_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to