Hi, ALL,
When I tried to execute the following code:
[code]
NSWorkspace *ws = [NSWorkspace sharedWorkspace]; | |
NSRunningApplication *app = [ws launchApplicationAtURL:url options:NSWorkspaceLaunchAsync | |
configuration:[NSDictionary dictionaryWithObject:params forKey:NSWorkspaceLaunchConfigurationArguments] | |
error:&error]; | |
[params release]; |
if( app != nil ) | |
pid = [app processIdentifier]; |
[/code]
and supply "/bin/ls" I'm getting "-1" as a pid.
However when I tried to run the app bundle, I'm getting the appropriate pid of the bundle.
Is there a solution for "one fits all"? Or I will have to rely om the fact that the pid of non-bundle application will always be "-1"?
Thank you.