diff options
author | joe <joe@jerkface.net> | 2014-03-12 21:24:09 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2014-03-12 21:24:09 -0400 |
commit | a778899096731cc087df795d8107bebf10efe59e (patch) | |
tree | e6c262264cb48e111819c1510e9763f5fab71ce1 /Presence/LocalPeerCred.hs | |
parent | 7167550ca24975e06e028de7c797612fff82a16d (diff) |
consolation demo program
Diffstat (limited to 'Presence/LocalPeerCred.hs')
-rw-r--r-- | Presence/LocalPeerCred.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Presence/LocalPeerCred.hs b/Presence/LocalPeerCred.hs index e5832b47..6f7735dd 100644 --- a/Presence/LocalPeerCred.hs +++ b/Presence/LocalPeerCred.hs | |||
@@ -162,6 +162,7 @@ scanProc uid inode = do | |||
162 | tty <- readSymbolicLink $ "/proc/"++pid++"/fd/0" | 162 | tty <- readSymbolicLink $ "/proc/"++pid++"/fd/0" |
163 | return (Just (pid,tty)) | 163 | return (Just (pid,tty)) |
164 | else loop fds | 164 | else loop fds |
165 | -- requires root (or same user as for pid)... | ||
165 | fds <- getDirectoryContents ("/proc/"++pid++"/fd") `catchIO_` return [] | 166 | fds <- getDirectoryContents ("/proc/"++pid++"/fd") `catchIO_` return [] |
166 | mb <- loop fds | 167 | mb <- loop fds |
167 | maybe (searchPids pids) (return . Just) mb | 168 | maybe (searchPids pids) (return . Just) mb |