summaryrefslogtreecommitdiff
path: root/whosocket.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2013-07-05 14:25:50 -0400
committerjoe <joe@jerkface.net>2013-07-05 14:25:50 -0400
commit6800f47bf1303496a01e1ec51cb89432630d76b1 (patch)
tree748e216e7ba61329f7559092af3bc76f027292ed /whosocket.hs
parent0a03f8ad6a5763b614397736017f189866815ec3 (diff)
save active local users as (user,tty,pid) tuples rather than JIDs.
quieted debug prints in identifyTTY
Diffstat (limited to 'whosocket.hs')
-rw-r--r--whosocket.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/whosocket.hs b/whosocket.hs
index a8dcdff9..cbf3cbec 100644
--- a/whosocket.hs
+++ b/whosocket.hs
@@ -142,14 +142,14 @@ ttyToXorgs tty_pids = do
142 142
143identifyTTY tty_pids uid inode = do 143identifyTTY tty_pids uid inode = do
144 pid <- scanProc (show uid) (L.unpack inode) 144 pid <- scanProc (show uid) (L.unpack inode)
145 putStrLn $ "scanProc --> "++show pid 145 -- putStrLn $ "scanProc --> "++show pid
146 flip (maybe (return Nothing)) pid $ \(pid,ttydev) -> do 146 flip (maybe (return Nothing)) pid $ \(pid,ttydev) -> do
147 tty <- ttyOrDisplay pid ttydev 147 tty <- ttyOrDisplay pid ttydev
148 putStrLn $ "users = " ++ show tty_pids 148 -- putStrLn $ "users = " ++ show tty_pids
149 dts <- ttyToXorgs tty_pids 149 dts <- ttyToXorgs tty_pids
150 150
151 putStrLn $ "displays = " ++ show dts 151 -- putStrLn $ "displays = " ++ show dts
152 putStrLn $ "tty = " ++ show tty 152 -- putStrLn $ "tty = " ++ show tty
153 -- -- displays = [(":5",Chunk "tty7" Empty)] 153 -- -- displays = [(":5",Chunk "tty7" Empty)]
154 154
155 let tty' = if take 3 tty=="tty" then Just (L.pack tty) else lookup (parseTty tty) (map (first parseTty) dts) 155 let tty' = if take 3 tty=="tty" then Just (L.pack tty) else lookup (parseTty tty) (map (first parseTty) dts)