better readProcess
This commit is contained in:
parent
1db7d27a45
commit
9fc94d780b
6 changed files with 21 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue