set fileEncoding on the off chance lsof outputs binary garbage
This commit is contained in:
parent
d799ef3182
commit
eb0e5be62f
1 changed files with 1 additions and 0 deletions
|
@ -48,6 +48,7 @@ queryDir path = query ["+d", path]
|
||||||
query :: [String] -> IO [(FilePath, LsofOpenMode, ProcessInfo)]
|
query :: [String] -> IO [(FilePath, LsofOpenMode, ProcessInfo)]
|
||||||
query opts =
|
query opts =
|
||||||
withHandle StdoutHandle (createProcessChecked checkSuccessProcess) p $ \h -> do
|
withHandle StdoutHandle (createProcessChecked checkSuccessProcess) p $ \h -> do
|
||||||
|
fileEncoding h
|
||||||
parse <$> hGetContentsStrict h
|
parse <$> hGetContentsStrict h
|
||||||
where
|
where
|
||||||
p = proc "lsof" ("-F0can" : opts)
|
p = proc "lsof" ("-F0can" : opts)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue