Skip to content

Commit

Permalink
Use throwErrnoIfMinus1Retry for mkstemp, fixes #282
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Nov 29, 2023
1 parent 4386d82 commit 69c169d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion System/Posix/Temp/PosixString.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ mkstemp :: PosixString -> IO (PosixPath, Handle)
mkstemp (PosixString template') = do
let template = PosixString $ template' `BC.append` (BC.pack [_X,_X,_X,_X,_X,_X])
withFilePath template $ \ ptr -> do
fd <- throwErrnoIfMinus1 "mkstemp" (c_mkstemp ptr)
fd <- throwErrnoIfMinus1Retry "mkstemp" (c_mkstemp ptr)
name <- peekFilePath ptr
h <- fdToHandle (Fd fd)
return (name, h)
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* add `haveStatx`
* fix `statx.stx_mnt_id` detection on buggy glibc, see [GHC #24072](https://gitlab.haskell.org/ghc/ghc/-/issues/24072)
* allow building with newer filepath/os-string
* Use `throwErrnoIfMinus1Retry` for mkstemp

## 2.8.3.0 *Oct 2023*

Expand Down

0 comments on commit 69c169d

Please sign in to comment.