[commit: ghc] ghc-8.6: base: Mention openFile throwing does-not-exist-errors on FIFOs (64a5044)
git at git.haskell.org
git at git.haskell.org
Thu Nov 22 22:05:17 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.6
Link : http://ghc.haskell.org/trac/ghc/changeset/64a5044543bdcd7983787b215a44bdfb70c9c40b/ghc
>---------------------------------------------------------------
commit 64a5044543bdcd7983787b215a44bdfb70c9c40b
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Thu Nov 22 11:33:39 2018 -0500
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)
>---------------------------------------------------------------
64a5044543bdcd7983787b215a44bdfb70c9c40b
libraries/base/GHC/IO/Handle/FD.hs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libraries/base/GHC/IO/Handle/FD.hs b/libraries/base/GHC/IO/Handle/FD.hs
index 786fccc..f7f8d04 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 =
More information about the ghc-commits
mailing list