I am working with Obj C and Cocoa framework. I am working on an application which has UI that interacts with a background process (Both are written by me). When application is started, background process is also started. Here, I want to put a check that if background process is already running (by any chance or if UI is crashed) it must be killed and new process must be started. What is the way to know whether a particular process is running or not and how to kill it programatically.