• 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
Issue with getting availableData from NSFileHandle on Intel Mac.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue with getting availableData from NSFileHandle on Intel Mac.


  • Subject: Issue with getting availableData from NSFileHandle on Intel Mac.
  • From: Sudheer dantuluri <email@hidden>
  • Date: Mon, 24 Sep 2007 17:19:08 +0530

Hi All ,

Getting availableData from NSFileHandle is taking time (nearly 30 secs) on Intel Mac .

[[[aTask standardOutput] fileHandleForReading] availableData]

But while running on a PPC , i'm able to get the data in less than a second.
Below is code snippet . Can anyone help me out in this issue.



NSTask* aTask = [[[NSTask alloc] init] autorelease]; [aTask setStandardOutput:[NSPipe pipe]]; [aTask setLaunchPath:@"/bin/launchctl"]; [aTask setArguments:[NSArray arrayWithObject:@"list"]]; [aTask launch]; [aTask waitUntilExit];

NSData *data = [[[aTask standardOutput] fileHandleForReading] availableData];
NSString *str = [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease];
NSArray *tasksList = [str componentsSeparatedByString:@"\n"];


Thanks In Advance
Sudheer.


_______________________________________________

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


  • Follow-Ups:
    • Re: Issue with getting availableData from NSFileHandle on Intel Mac.
      • From: Alastair Houghton <email@hidden>
  • Prev by Date: Closing application from NSStatusBar menu?
  • Next by Date: Re: Core data or else?
  • Previous by thread: Closing application from NSStatusBar menu?
  • Next by thread: Re: Issue with getting availableData from NSFileHandle on Intel Mac.
  • Index(es):
    • Date
    • Thread