You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If O_EXCL is set and O_CREAT is not set, the result is undefined.
This library should either make the correspondence of those input arguments clear or make it impossible to use the combination. The following would already be quite an improvement:
--|Correspond to some of the int flags from C's fcntl.h.dataOpenFileFlags=OpenFileFlags{append::Bool, --^ O_APPENDexclusive::Bool, --^ O_EXCL, result is undefined if O_CREAT is Falsenoctty::Bool, --^ O_NOCTTYnonBlock::Bool, --^ O_NONBLOCKtrunc::Bool, --^ O_TRUNCcreat::MaybeFileMode--^ O_CREAT }
And then remove the extraneous Maybe FileMode arguments from open_.
The text was updated successfully, but these errors were encountered:
hasufell
added a commit
to hasufell/unix
that referenced
this issue
May 1, 2016
* Add support for `O_NOFOLLOW`, `O_CLOEXEC`, `O_DIRECTORY` and `O_SYNC`
(#6, #57)
* Refactor API of `openFd` removing `Maybe FileMode` argument,
which now must be passed as part of `OpenFileFlags`
(e.g. `defaultFileFlags { creat = Just mode }`) (#58)
Closes#59
It's not very well documented, because
O_CREAT
is not passed like the other flags viaOpenFileFlags
, but implicitly viaMaybe FileMode
.The manpage says that
This library should either make the correspondence of those input arguments clear or make it impossible to use the combination. The following would already be quite an improvement:
And then remove the extraneous
Maybe FileMode
arguments fromopen_
.The text was updated successfully, but these errors were encountered: