packages feed

process 1.6.5.0 → 1.6.5.1

raw patch · 3 files changed

+54/−39 lines, 3 filesdep ~basedep ~unix

Dependency ranges changed: base, unix

Files

System/Process.hs view
@@ -454,26 +454,31 @@                     std_out = CreatePipe                   }     (ex, output) <- withCreateProcess_ "readCreateProcess" cp_opts $-      \(Just inh) (Just outh) _ ph -> do+      \mb_inh mb_outh _ ph ->+        case (mb_inh, mb_outh) of+          (Just inh, Just outh) -> do -        -- fork off a thread to start consuming the output-        output  <- hGetContents outh-        withForkWait (C.evaluate $ rnf output) $ \waitOut -> do+            -- fork off a thread to start consuming the output+            output  <- hGetContents outh+            withForkWait (C.evaluate $ rnf output) $ \waitOut -> do -          -- now write any input-          unless (null input) $-            ignoreSigPipe $ hPutStr inh input-          -- hClose performs implicit hFlush, and thus may trigger a SIGPIPE-          ignoreSigPipe $ hClose inh+              -- now write any input+              unless (null input) $+                ignoreSigPipe $ hPutStr inh input+              -- hClose performs implicit hFlush, and thus may trigger a SIGPIPE+              ignoreSigPipe $ hClose inh -          -- wait on the output-          waitOut-          hClose outh+              -- wait on the output+              waitOut+              hClose outh -        -- wait on the process-        ex <- waitForProcess ph-        return (ex, output)+            -- wait on the process+            ex <- waitForProcess ph+            return (ex, output) +          (Nothing,_) -> error "readCreateProcess: Failed to get a stdin handle."+          (_,Nothing) -> error "readCreateProcess: Failed to get a stdout handle."+     case ex of      ExitSuccess   -> return output      ExitFailure r -> processFailedException "readCreateProcess" cmd args r@@ -486,7 +491,7 @@              CreateProcess { cmdspec = RawCommand _ args' } -> args'  --- | @readProcessWithExitCode@ is like @readProcess@ but with two differences:+-- | @readProcessWithExitCode@ is like 'readProcess' but with two differences: -- --  * it returns the 'ExitCode' of the process, and does not throw any --    exception if the code is not 'ExitSuccess'.@@ -523,32 +528,37 @@                     std_err = CreatePipe                   }     withCreateProcess_ "readCreateProcessWithExitCode" cp_opts $-      \(Just inh) (Just outh) (Just errh) ph -> do+      \mb_inh mb_outh mb_errh ph ->+        case (mb_inh, mb_outh, mb_errh) of+          (Just inh, Just outh, Just errh) -> do -        out <- hGetContents outh-        err <- hGetContents errh+            out <- hGetContents outh+            err <- hGetContents errh -        -- fork off threads to start consuming stdout & stderr-        withForkWait  (C.evaluate $ rnf out) $ \waitOut ->-         withForkWait (C.evaluate $ rnf err) $ \waitErr -> do+            -- fork off threads to start consuming stdout & stderr+            withForkWait  (C.evaluate $ rnf out) $ \waitOut ->+             withForkWait (C.evaluate $ rnf err) $ \waitErr -> do -          -- now write any input-          unless (null input) $-            ignoreSigPipe $ hPutStr inh input-          -- hClose performs implicit hFlush, and thus may trigger a SIGPIPE-          ignoreSigPipe $ hClose inh+              -- now write any input+              unless (null input) $+                ignoreSigPipe $ hPutStr inh input+              -- hClose performs implicit hFlush, and thus may trigger a SIGPIPE+              ignoreSigPipe $ hClose inh -          -- wait on the output-          waitOut-          waitErr+              -- wait on the output+              waitOut+              waitErr -          hClose outh-          hClose errh+              hClose outh+              hClose errh -        -- wait on the process-        ex <- waitForProcess ph+            -- wait on the process+            ex <- waitForProcess ph+            return (ex, out, err) -        return (ex, out, err)+          (Nothing,_,_) -> error "readCreateProcessWithExitCode: Failed to get a stdin handle."+          (_,Nothing,_) -> error "readCreateProcessWithExitCode: Failed to get a stdout handle."+          (_,_,Nothing) -> error "readCreateProcessWithExitCode: Failed to get a stderr handle."  -- | Fork a thread while doing something else, but kill it if there's an -- exception.
changelog.md view
@@ -1,5 +1,10 @@ # Changelog for [`process` package](http://hackage.haskell.org/package/process) +## 1.6.5.1 *June 2019*++* Version bound bumps+* Slightly nicer error messages for internal errors+ ## 1.6.5.0 *December 2018*  * Bug fix: On Windows ignore ERROR_ACCESS_DENIED for TerminateProcess() if the process did terminate
process.cabal view
@@ -1,5 +1,5 @@ name:          process-version:       1.6.5.0+version:       1.6.5.1 -- NOTE: Don't forget to update ./changelog.md license:       BSD3 license-file:  LICENSE@@ -16,7 +16,7 @@     which uses this package internally. It features better binary     support, easier concurrency, and a more composable API. You can     read more about it at-    <https://haskell-lang.org/library/typed-process>.+    <https://github.com/fpco/typed-process/#readme>.  extra-source-files:     aclocal.m4@@ -60,7 +60,7 @@         cpp-options: -DWINDOWS     else         other-modules: System.Process.Posix-        build-depends: unix >= 2.5 && < 2.9+        build-depends: unix >= 2.5 && < 2.8      c-sources:         cbits/runProcess.c@@ -73,7 +73,7 @@      ghc-options: -Wall -    build-depends: base      >= 4.8.2 && < 4.13,+    build-depends: base      >= 4.8.2 && < 4.14,                    directory >= 1.1 && < 1.4,                    filepath  >= 1.2 && < 1.5,                    deepseq   >= 1.1 && < 1.5