• 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 exception on Intel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSTask exception on Intel
      • From: j o a r <email@hidden>
    • RE: NSTask exception on Intel
      • From: Nick Briggs <email@hidden>
  • Prev by Date: Re: How to disable an NSWindow
  • Next by Date: RE: NSTask exception on Intel
  • Previous by thread: Re: How to disable an NSWindow
  • Next by thread: RE: NSTask exception on Intel
  • Index(es):
    • Date
    • Thread