I launch one application with NSTask, but when the the launched process has exit. I find the parent process's thread will increate.
Code:
NSWorkspace *workSpace = [NSWorkspace sharedWorkspace];
NSString *appPath = [workSpace absolutePathForAppBundleWithIdentifier:@"com.company.someapp"];
NSBundle *appBundle = [NSBundle bundleWithPath:appPath];
NSString *excuPath = [appBundle executablePath];
NSMutableArray* args = [[[NSMutableArray alloc] init] autorelease];
NSString* arg1 = @"some args";
[args addObject:arg1];
NSTask* theTask = [NSTask launchedTaskWithLaunchPath:excuPath arguments:args];
[theTask waitUntilExit];
On tiger. it don't increate. if there is some bugs in my code? or it's OS issue?
Thanks