• 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
Re: NSTask not completing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask not completing


  • Subject: Re: NSTask not completing
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 6 Mar 2008 13:06:37 -0800


On 6 Mar '08, at 12:35 PM, Charles Ross wrote:

However, the following code, when run from a simple Foundation Tool I built to figure out what's going on, never gets to the second NSLog statement, even after running for more than ten minutes. Is this process really taking that long or am I missing something?

I think the pipe blocks because the file handle's buffer fills up. You don't have any code that reads the data from the file handle. If you want to buffer all of the output into memory, you'll have to write code to do that yourself (although it would be better to process the lines incrementally.)


FYI, in general if you're wondering what a process is taking time doing, the quickest way to find out is to use Activity Monitor, or the "sample" command, to sample it for a few seconds .

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

References: 
 >NSTask not completing (From: Charles Ross <email@hidden>)

  • Prev by Date: Using an auto incremented NSNumber as attribute in a NSManagedObject
  • Next by Date: Re: Cocoa - Not loading any window at startup ...
  • Previous by thread: NSTask not completing
  • Next by thread: Re: NSTask not completing
  • Index(es):
    • Date
    • Thread