NSTask exception on Intel
NSTask exception on Intel
- Subject: NSTask exception on Intel
- From: Nick Briggs <email@hidden>
- Date: Sat, 20 Jan 2007 14:36:57 +0000
Hi
This code works fine on PPC, but on Intel throughs an exception at
"data = [handle availableData]" , any clues why?
NSTask *task = [[NSTask alloc] init];
NSPipe *pipe = [NSPipe pipe];
NSFileHandle *handle = [pipe fileHandleForReading];
NSData *data = nil;
[task setStandardOutput:pipe];
[task setLaunchPath:@"/usr/bin/pmset"];
[task setArguments:[NSArray arrayWithObjects:@"-g", @"sched", nil]];
[task launch];
data = [handle availableData];
[task release];
cheers
Nick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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