Process Termination

  1. import Prelude
  2. import Control.Process (isAlive, exitProc)
  3. -- Exit the current process
  4. exit :normal
  5. go :: Process Boolean
  6. go = do
  7. pid <- spawn (receive _ -> return ())
  8. exitProc pid :reason
  9. isAlive pid