packages feed

Hclip 1.0.0.1 → 1.0.0.2

raw patch · 2 files changed

+4/−5 lines, 2 files

Files

Hclip.cabal view
@@ -10,7 +10,7 @@ -- PVP summary:      +-+------- breaking API changes --                   | | +----- non-breaking API additions --                   | | | +--- code changes with no API change-version:             1.0.0.1+version:             1.0.0.2  -- A short (one-line) description of the package. synopsis:            A small cross-platform library for reading and modifying the system clipboard.
System/Hclip.hs view
@@ -11,8 +11,7 @@ -- Stability : experimental -- Portability:  ----- A small cross-platform library for reading and modifying the --- system clipboard. +-- A small cross-platform library for reading and modifying the system clipboard.  --  -------------------------------------------------------------------- @@ -23,7 +22,7 @@         ClipboardError(..)   ) where -import System.Process (runInteractiveCommand, readProcessWithExitCode) +import System.Process (runInteractiveCommand, readProcessWithExitCode, waitForProcess) import System.Info (os) import System.IO (Handle, hPutStr, hClose) import Data.Monoid @@ -151,7 +150,7 @@ withExternalCommand :: String -> Command -> IO String withExternalCommand prog command =    bracket (runInteractiveCommand prog)-          (\(inp, outp, stderr, _) -> mapM_ hClose [inp, outp, stderr])+          (\(inp, outp, stderr, pid) -> do mapM_ hClose [inp, outp, stderr] >> waitForProcess pid)           (\(inp, outp, _, _) -> action command (inp, outp))   where     action GetClipboard = hGetContents . stdout