mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
add [NSApplication sharedApplication] to be sure relaucher stay alive and check if pid exists
This commit is contained in:
1 parent
d7cf93dcf4
commit
254cf85f26
1 file changed
+6
@@ -27,6 +27,11 @@
|
||||
// ppid is launchd (1) => parent terminated already
|
||||
[self relaunch];
|
||||
}
|
||||
|
||||
ProcessSerialNumber psn;
|
||||
if (GetProcessForPID(ppid, &psn) == procNotFound) {
|
||||
[self relaunch];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -53,6 +58,7 @@ int main (int argc, const char * argv[])
|
||||
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
[NSApplication sharedApplication];
|
||||
[[[TerminationListener alloc] initWithExecutablePath:argv[1] parentProcessId:atoi(argv[2])] autorelease];
|
||||
[NSApp run];
|
||||
|
||||
|
||||
Reference in new issue
Block a user