packages feed

process 1.4.1.0 → 1.4.2.0

raw patch · 7 files changed

+38/−9 lines, 7 files

Files

System/Process.hsc view
@@ -57,6 +57,7 @@      -- Interprocess communication     createPipe,+    createPipeFd,      -- * Old deprecated functions     -- | These functions pre-date 'createProcess' which is much more
System/Process/Internals.hs view
@@ -38,6 +38,7 @@     withFilePathException, withCEnvironment,     translate,     createPipe,+    createPipeFd,     interruptProcessGroupOf,     ) where @@ -45,6 +46,7 @@ import System.IO  import GHC.IO.Handle.FD (fdToHandle)+import System.Posix.Internals (FD)  import System.Process.Common @@ -162,6 +164,17 @@ createPipe :: IO (Handle, Handle) createPipe = createPipeInternal {-# INLINE createPipe #-}++-- ---------------------------------------------------------------------------+-- createPipeFd++-- | Create a pipe for interprocess communication and return a+-- @(readEnd, writeEnd)@ `FD` pair.+--+-- @since 1.4.2.0+createPipeFd :: IO (FD, FD)+createPipeFd = createPipeInternalFd+{-# INLINE createPipeFd #-}   -- ----------------------------------------------------------------------------
System/Process/Posix.hs view
@@ -15,6 +15,7 @@     , c_execvpe     , pPrPr_disableITimers     , createPipeInternal+    , createPipeInternalFd     , interruptProcessGroupOfInternal     ) where @@ -278,6 +279,11 @@     readh <- Posix.fdToHandle readfd     writeh <- Posix.fdToHandle writefd     return (readh, writeh)++createPipeInternalFd :: IO (FD, FD)+createPipeInternalFd = do+   (Fd readfd, Fd writefd) <- Posix.createPipe+   return (readfd, writefd)  interruptProcessGroupOfInternal     :: ProcessHandle    -- ^ A process in the process group
System/Process/Windows.hsc view
@@ -10,6 +10,7 @@     , stopDelegateControlC     , isDefaultSignal     , createPipeInternal+    , createPipeInternalFd     , interruptProcessGroupOfInternal     ) where @@ -244,14 +245,19 @@  createPipeInternal :: IO (Handle, Handle) createPipeInternal = do-    (readfd, writefd) <- allocaArray 2 $ \ pfds -> do+    (readfd, writefd) <- createPipeInternalFd+    (do readh <- fdToHandle readfd+        writeh <- fdToHandle writefd+        return (readh, writeh)) `onException` (close' readfd >> close' writefd)+        +createPipeInternalFd :: IO (FD, FD)+createPipeInternalFd = do+    allocaArray 2 $ \ pfds -> do         throwErrnoIfMinus1_ "_pipe" $ c__pipe pfds 2 (#const _O_BINARY)         readfd <- peek pfds         writefd <- peekElemOff pfds 1         return (readfd, writefd)-    (do readh <- fdToHandle readfd-        writeh <- fdToHandle writefd-        return (readh, writeh)) `onException` (close' readfd >> close' writefd)+  close' :: CInt -> IO () close' = throwErrnoIfMinus1_ "_close" . c__close
changelog.md view
@@ -1,5 +1,11 @@ # Changelog for [`process` package](http://hackage.haskell.org/package/process) +## 1.4.2.0 *January 2016*++* Added `createPipeFD` [#52](https://github.com/haskell/process/pull/52)+    * New function `createPipeFD` added which returns a POSIX File Descriptor (CInt)+      instead of a GHC Handle to a pipe+ ## 1.4.1.0 *November 2015*  * Use less CPP [#47](https://github.com/haskell/process/pull/47)
configure.ac view
@@ -5,10 +5,7 @@  AC_CONFIG_HEADERS([include/HsProcessConfig.h]) -AC_ARG_WITH([cc],-            [C compiler],-            [CC=$withval])-AC_PROG_CC()+AC_PROG_CC  dnl ** Working vfork? AC_FUNC_FORK
process.cabal view
@@ -1,5 +1,5 @@ name:          process-version:       1.4.1.0+version:       1.4.2.0 -- NOTE: Don't forget to update ./changelog.md license:       BSD3 license-file:  LICENSE