createBackgroundProc :: String -> [Value] -> Handles -> IO Process
createBackgroundProc cmd args (Handles stdin stdout stderr) = do
  let p = (Proc.proc cmd (map value2ProcString args)) {
      Proc.std_in = Proc.UseHandle stdin
    , Proc.std_out = Proc.UseHandle stdout
    , Proc.std_err = Proc.UseHandle stderr
    , Proc.close_fds = True }
  result <- try $ liftIO $ Proc.createProcess_ cmd p
  case result of
    Right (_, _, _, proc) -> return $ ProcProc proc
    Left e -> return $ DeferredException e
createBackgroundProc :: String -> [Value] -> Handles -> IO Process
createBackgroundProc cmd args (Handles stdin stdout stderr) = do
  let p = (Proc.proc cmd (map value2ProcString args)) {
      Proc.std_in = Proc.UseHandle stdin
    , Proc.std_out = Proc.UseHandle stdout
    , Proc.std_err = Proc.UseHandle stderr
    , Proc.close_fds = True }
  result <- try $ liftIO $ Proc.createProcess_ cmd p
  case result of
    Right (_, _, _, proc) -> return $ ProcProc proc
    Left e -> return $ DeferredException e
createBackgroundProc cmd args (Handles stdin stdout stderr) = do
  let p = (Proc.proc cmd (map value2ProcString args)) {
      Proc.std_in = Proc.UseHandle stdin
    , Proc.std_out = Proc.UseHandle stdout
    , Proc.std_err = Proc.UseHandle stderr
    , Proc.close_fds = True }
  result <- try $ liftIO $ Proc.createProcess_ cmd p
  case result of
    Right (_, _, _, proc) -> return $ ProcProc proc
    Left e -> return $ DeferredException e