better readProcess

This commit is contained in:
Joey Hess 2012-07-19 00:57:40 -04:00
parent 1db7d27a45
commit 9fc94d780b
6 changed files with 21 additions and 9 deletions

View file

@ -160,7 +160,7 @@ tooManyWatches hook dir = do
querySysctl :: Read a => [CommandParam] -> IO (Maybe a)
querySysctl ps = do
v <- catchMaybeIO $ readProcess "sysctl" (toCommand ps) []
v <- catchMaybeIO $ readProcess "sysctl" (toCommand ps)
case v of
Nothing -> return Nothing
Just s -> return $ parsesysctl s