diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2018-11-22 11:33:39 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-11-22 17:02:45 -0500 |
commit | 64a5044543bdcd7983787b215a44bdfb70c9c40b (patch) | |
tree | 661f4ba32292d871622d3e25404eecced5565b6e | |
parent | c2c6f49845698275c1e83f0c93b9c4b558c7ba08 (diff) | |
download | haskell-64a5044543bdcd7983787b215a44bdfb70c9c40b.tar.gz |
base: Mention openFile throwing does-not-exist-errors on FIFOs
As discussed in #15715, the POSIX specification specifies that
attempting to open a FIFO in write-only mode when the FIFO has no
readers will fail with -ENOENT.
[skip ci]
Test Plan: Read it
Reviewers: hvr
Subscribers: rwbarton, carter
GHC Trac Issues: #15715
Differential Revision: https://phabricator.haskell.org/D5295
(cherry picked from commit 4ba3fa31ddfa12b428bd67216a2d4118dc9e8311)
-rw-r--r-- | libraries/base/GHC/IO/Handle/FD.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libraries/base/GHC/IO/Handle/FD.hs b/libraries/base/GHC/IO/Handle/FD.hs index 786fccc4f1..f7f8d042b8 100644 --- a/libraries/base/GHC/IO/Handle/FD.hs +++ b/libraries/base/GHC/IO/Handle/FD.hs @@ -130,7 +130,9 @@ addFilePathToIOError fun fp ioe -- -- * 'isAlreadyInUseError' if the file is already open and cannot be reopened; -- --- * 'isDoesNotExistError' if the file does not exist; or +-- * 'isDoesNotExistError' if the file does not exist or +-- (on POSIX systems) is a FIFO without a reader and 'WriteMode' was +-- requested; or -- -- * 'isPermissionError' if the user does not have permission to open the file. -- @@ -161,7 +163,7 @@ openFileBlocking fp im = -- this is undesirable; also, as usual under Microsoft operating systems, -- text mode treats control-Z as EOF. Binary mode turns off all special -- treatment of end-of-line and end-of-file characters. --- (See also 'hSetBinaryMode'.) +-- (See also 'System.IO.hSetBinaryMode'.) openBinaryFile :: FilePath -> IOMode -> IO Handle openBinaryFile fp m = |