Closed Rufflewind closed 4 months ago
I think we discussed this already in https://github.com/hasufell/file-io/pull/5 and the verdict was that this library tries to stay as close to base behavior as possible.
You can use setCloseOnExec explicitly.
You can use setCloseOnExec explicitly.
It isn't thread-safe since another thread can fork the executable between open and setCloseOnExec.
We can provide a variant openFileWithCloseOnExec
, possibly through a .Internal
module.
Internal modules still follow PVP, but may not have deprecation periods.
Sounds good.
Published it: https://hackage.haskell.org/package/file-io-0.1.2
Another diff observed while trying to migrate directory to file-io (https://github.com/hasufell/file-io/issues/4#issue-1365527787):
Should files opened by file-io set O_CLOEXEC to prevent them from being inherited by child processes?