haskell/cabal — pull request #1545 by luite (2013-10-15 21:00:11+00:00)
Title: make rawSystemIOWithEnv close its handles

Some comments claim that `rawSystemIOWithEnv` closes the handles passed to it before returning, but it doesn't, which caused some _Resource temporarily unavailable_ problems with `cabal test` on my system (i686 linux with GHC HEAD). This patch fixes that.

The patch uses the same method as `runProcess` to close the handles (instead of passing `close_fds = True` in the `CreateProcess` struct):
http://git.haskell.org/packages/process.git/blob/HEAD:/System/Process.hs#l154