Repository : ssh://darcs.haskell.org//srv/darcs/packages/process

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/b5ee908863882d18e4110d96b43ccc1bb5068ceb

>---------------------------------------------------------------

commit b5ee908863882d18e4110d96b43ccc1bb5068ceb
Author: Bas van Dijk <[email protected]>
Date:   Tue Feb 7 20:18:57 2012 +0100

    Fixed asynchronous exception bugs in readProcess and 
readProcessWithExitCode This patch fixes the following two bugs:
    
    1) If an asynchronous exception was thrown to the thread executing
       readProcess somewhere after createProcess was executed, the standard 
handles
       would not be closed anymore resulting in a "handle leak" so to speak.
    
       This is fixed by catching exceptions in the IO processing code and
       closing the standard handles when an exception occurs.
       Additionally, I also terminate the process and wait for its termination.
    
    2) If an asynchronous exception was thrown to the
       stdout/stderr-read-thread it did not execute the putMVar anymore
       resulting in a dead-lock when takeMVar was executed.
    
       This is fixed by properly catching exception in the read-thread
       and propagating them to the parent thread which will then handle
       them as described above.

 System/Process.hs |  138 ++++++++++++++++++++++++++++++----------------------
 process.cabal     |    3 +-
 2 files changed, 82 insertions(+), 59 deletions(-)


Diff suppressed because of size. To see it, use:

    git show b5ee908863882d18e4110d96b43ccc1bb5068ceb

_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to