Fixed the relaunch tool to have Leoaprd compatibility (thanks, Cedric Luthi)

This commit is contained in:
andym committed 2007-11-14 11:08:41 +00:00
1 parent 77cbce44b8
commit 690f04e356
2 files changed
+3 -4

No files matched your search

+1 -1
View File
@@ -72,7 +72,7 @@
isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = D1E42C2E0CE754AE00F50EB9 /* Relaunch Tool */;
remoteGlobalIDString = D1E42C2E0CE754AE00F50EB9;
remoteInfo = "Relaunch Tool";
};
/* End PBXContainerItemProxy section */
+2 -3
View File
@@ -47,7 +47,7 @@
- (void) relaunch
{
[[NSWorkspace sharedWorkspace] launchApplication:[NSString stringWithUTF8String:executablePath]];
[NSApp terminate:self];
[NSApp stop:self];
}
@end
@@ -60,9 +60,8 @@ int main (int argc, const char * argv[])
[NSApplication sharedApplication];
[[[TerminationListener alloc] initWithExecutablePath:argv[1] parentProcessId:atoi(argv[2])] autorelease];
[NSApp run];
[[NSApplication sharedApplication] run];
// This will not be executed because -[NSApp terminate:] is called
[pool release];
return EXIT_SUCCESS;