1 module Main(main) where
7 ppid <- getParentProcessID
9 putStr "Parent Process ID: "
13 putStr "forking ps ux"
17 Nothing -> executeFile "ps" True ["ux" ++ show ppid] Nothing
18 Just x -> doParent x pid
20 doParent cpid pid = do
21 getProcessStatus True False cpid
22 putStr "\nChild finished. Now exec'ing ps ux\n"
24 executeFile "ps" True ["ux" ++ show pid] Nothing