readProcessWithExitCode leaks when the program does not exist
|Reported by:||luite||Owned by:||snoyberg|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Rev(s):|
import Control.Monad import System.Process import qualified Control.Exception as C try' :: IO a -> IO (Either C.SomeException a) try' = C.try main = replicateM_ 1000 $ do try' (readProcessWithExitCode "doesnotexist"  "") print =<< try' (readProcessWithExitCode "/bin/echo" ["it works"] "")
This eventually runs out of file descriptors and fails to start the existing process.
Tested with process 22.214.171.124 and GHC 7.8.2 on OS X