• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTask and 45, "Operation not supported" error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Software Update APi in Cocoa
  • Next by Date: Re: What are the official limits of Cocoa when it comes to the length of path names?
  • Previous by thread: Re: NSMutableAttributedString initWithHTML / initWithData trouble
  • Next by thread: NSApplicationMain options
  • Index(es):
    • Date
    • Thread