Hello community,

here is the log from the commit of package ghc-streaming-commons for 
openSUSE:Factory checked in at 2016-02-17 10:25:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-streaming-commons (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-streaming-commons.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-streaming-commons"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/ghc-streaming-commons/ghc-streaming-commons.changes  
    2015-12-01 09:19:36.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.ghc-streaming-commons.new/ghc-streaming-commons.changes
 2016-02-17 12:12:01.000000000 +0100
@@ -1,0 +2,6 @@
+Thu Feb 11 08:50:21 UTC 2016 - mimi...@gmail.com
+
+- update to 0.1.15.1
+* Catch exceptions thrown by waitForProcess
+
+-------------------------------------------------------------------

Old:
----
  streaming-commons-0.1.15.tar.gz

New:
----
  streaming-commons-0.1.15.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-streaming-commons.spec ++++++
--- /var/tmp/diff_new_pack.b7NfAk/_old  2016-02-17 12:12:02.000000000 +0100
+++ /var/tmp/diff_new_pack.b7NfAk/_new  2016-02-17 12:12:02.000000000 +0100
@@ -21,7 +21,7 @@
 %bcond_with tests
 
 Name:           ghc-streaming-commons
-Version:        0.1.15
+Version:        0.1.15.1
 Release:        0
 Summary:        Common lower-level functions needed by various streaming data 
libraries
 License:        MIT
@@ -35,6 +35,7 @@
 BuildRequires:  ghc-rpm-macros
 # Begin cabal-rpm deps:
 BuildRequires:  ghc-array-devel
+BuildRequires:  ghc-async-devel
 BuildRequires:  ghc-blaze-builder-devel
 BuildRequires:  ghc-bytestring-devel
 BuildRequires:  ghc-directory-devel

++++++ streaming-commons-0.1.15.tar.gz -> streaming-commons-0.1.15.1.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/streaming-commons-0.1.15/ChangeLog.md 
new/streaming-commons-0.1.15.1/ChangeLog.md
--- old/streaming-commons-0.1.15/ChangeLog.md   2015-11-24 11:28:14.000000000 
+0100
+++ new/streaming-commons-0.1.15.1/ChangeLog.md 2016-02-08 19:05:13.000000000 
+0100
@@ -1,3 +1,7 @@
+## 0.1.15.1
+
+* Catch exceptions thrown by `waitForProcess`
+
 ## 0.1.15
 
 * Use `NO_DELAY1 for TCP client connections 
[#27](https://github.com/fpco/streaming-commons/issues/27)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/streaming-commons-0.1.15/Data/Streaming/Process.hs 
new/streaming-commons-0.1.15.1/Data/Streaming/Process.hs
--- old/streaming-commons-0.1.15/Data/Streaming/Process.hs      2015-11-24 
11:28:14.000000000 +0100
+++ new/streaming-commons-0.1.15.1/Data/Streaming/Process.hs    2016-02-08 
19:05:13.000000000 +0100
@@ -31,11 +31,12 @@
     ) where
 
 import           Control.Applicative             ((<$>), (<*>))
-import           Control.Concurrent              (forkIO)
+import           Control.Concurrent              (forkIOWithUnmask)
 import           Control.Concurrent.STM          (STM, TMVar, atomically,
                                                   newEmptyTMVar, putTMVar,
                                                   readTMVar)
-import           Control.Exception               (Exception, throwIO)
+import           Control.Exception               (Exception, throwIO, try, 
throw,
+                                                  SomeException)
 import           Control.Monad.IO.Class          (MonadIO, liftIO)
 import           Data.Maybe                      (fromMaybe)
 import           Data.Streaming.Process.Internal
@@ -157,7 +158,16 @@
         }
 
     ec <- atomically newEmptyTMVar
-    _ <- forkIO $ waitForProcess ph >>= atomically . putTMVar ec
+    -- Apparently waitForProcess can throw an exception itself when
+    -- delegate_ctlc is True, so to avoid this TMVar from being left empty, we
+    -- capture any exceptions and store them as an impure exception in the
+    -- TMVar
+    _ <- forkIOWithUnmask $ \_unmask -> try (waitForProcess ph)
+        >>= atomically
+          . putTMVar ec
+          . either
+              (throw :: SomeException -> a)
+              id
 
     (,,,)
         <$> getStdin stdinH
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/streaming-commons-0.1.15/streaming-commons.cabal 
new/streaming-commons-0.1.15.1/streaming-commons.cabal
--- old/streaming-commons-0.1.15/streaming-commons.cabal        2015-11-24 
11:28:14.000000000 +0100
+++ new/streaming-commons-0.1.15.1/streaming-commons.cabal      2016-02-08 
19:05:13.000000000 +0100
@@ -1,5 +1,5 @@
 name:                streaming-commons
-version:             0.1.15
+version:             0.1.15.1
 synopsis:            Common lower-level functions needed by various streaming 
data libraries
 description:         Provides low-dependency functionality commonly needed by 
various streaming data libraries, such as conduit and pipes.
 homepage:            https://github.com/fpco/streaming-commons
@@ -49,6 +49,7 @@
 
   build-depends:       base >= 4.4 && < 5
                      , array
+                     , async
                      , blaze-builder >= 0.3 && < 0.5
                      , bytestring
                      , directory


Reply via email to