Launching via the Finder includes a single argument that looks like: -psn_0_3801089. there's some mapping between this number and pids but I don't know what off hand (or why it's even used at all). Don't pass it along to our main().
This commit is contained in:
@@ -46,7 +46,10 @@
|
||||
- (id) initWithArgc:(int)argc argv:(char **)argv
|
||||
{
|
||||
[super init];
|
||||
m_iArgc = argc;
|
||||
if( argc == 2 && !strncmp(argv[1], "-psn_", 4) )
|
||||
m_iArgc = 1;
|
||||
else
|
||||
m_iArgc = argc;
|
||||
m_pArgv = argv;
|
||||
return self;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user