/ Published in: Objective C
The application that needs to be restarted must fork 'relaunch' with two arguments, then terminate. In Cocoa, the fork is easily achieved with a NSTask. The first argument must be the path to the application to relaunch. The second argument must be the process identifier of the terminating application. In Cocoa, you can get it with [[NSProcessInfo processInfo] processIdentifier], which is equivalent to getpid().