NSTask and 45, "Operation not supported" error
NSTask and 45, "Operation not supported" error
- Subject: NSTask and 45, "Operation not supported" error
- From: Henk Kampman <email@hidden>
- Date: Sat, 14 Jul 2007 14:26:56 +0200
My NSTask runs flawlessly on the following hardware/software
configurations:
G5 10.4.10
Intel iMac 10.4.10
G4 10.4.9
but always fails on a Mac-mini (Intel) running OX 10.4.9 with the
error message:
*** NSTask: Task create for path /bin/launchctl failed: 45,
"Operation not supported"
Any ideas?
Henk
The code:
-(void) enableWatchdog:(BOOL) enable
{
NSTask *aTask = [[NSTask alloc] init];
NSMutableArray *args = [NSMutableArray array];
NSString* workingDir = [[[NSBundle mainBundle] bundlePath]
stringByDeletingLastPathComponent];
NSString* launchdInfoPath = [[NSBundle mainBundle] pathForResource:
@"Launchd" ofType: @"plist"];
[aTask setCurrentDirectoryPath: workingDir];
[aTask setLaunchPath: @"/bin/launchctl"];
[args addObject: enable ? @"load" : @"unload"];
[args addObject:launchdInfoPath];
[aTask setArguments:args];
[aTask launch];
[aTask waitUntilExit];
[aTask release];
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden