I want to be able to detect when another program exits. For example, if i exit my browser, i want my program to detect this and launch another process. How do i do this?