summaryrefslogtreecommitdiff
path: root/Utility/Lsof.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-02-18 17:20:52 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-02-18 17:20:52 -0400
commit23ea742d00fe89e0629377235ec1df63d4da36e8 (patch)
tree4e48dd0593c2695109575f979ad76f8c7a86b174 /Utility/Lsof.hs
parent58ef7201e2dfb39fe44e34477daa4fd37b071ab7 (diff)
set fileEncoding on the off chance lsof outputs binary garbage
Diffstat (limited to 'Utility/Lsof.hs')
-rw-r--r--Utility/Lsof.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/Utility/Lsof.hs b/Utility/Lsof.hs
index dd2914427..2c312a461 100644
--- a/Utility/Lsof.hs
+++ b/Utility/Lsof.hs
@@ -48,6 +48,7 @@ queryDir path = query ["+d", path]
query :: [String] -> IO [(FilePath, LsofOpenMode, ProcessInfo)]
query opts =
withHandle StdoutHandle (createProcessChecked checkSuccessProcess) p $ \h -> do
+ fileEncoding h
parse <$> hGetContentsStrict h
where
p = proc "lsof" ("-F0can" : opts)