Just expanding the answer to Julia, since I had to restart the application for a reason other than updating, I looked at how Sparkle works -
( 11/2011) Sparkle , finish_installation.app, Resources Sparkle. Sparkle, -, finish_application application_support , , :
NSString *relaunchToolPath = [NSString stringWithFormat:@"%@/finish_installation.app/Contents/MacOS/finish_installation", tempDir];
[NSTask launchedTaskWithLaunchPath: relaunchToolPath arguments:[NSArray arrayWithObjects:pathToRelaunch, [NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]], tempDir, relaunch ? @"1" : @"0", nil]];
[NSApp terminate:self];
, , (?), finish_application.
finish_installation , , , , (pid = 1)
if(getppid() == 1)...
if (GetProcessForPID(parentprocessid, &psn) == procNotFound)...
:
[[NSWorkspace sharedWorkspace] openFile: appPath];
: , finish_installation , , - :
ProcessSerialNumber psn = { 0, kCurrentProcess };
TransformProcessType( &psn, kProcessTransformToForegroundApplication );