• 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: Gerd Knops <email@hidden>
  • Date: Mon, 10 Mar 2008 16:39:53 -0500


On Mar 6, 2008, at 2:35 PM, Charles Ross wrote:


[..]

If I enter the following command in the terminal, it returns about 20,000 records to the screen in about one second:

sqlite3 Videos.sql 'select * from ZVIDEOS'

The file has a fairly large number of records, almost 20,000. 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?

You need to read the data before the task can finish.

Simplest case:

...
	[t launch];
	NSLog(@"t launched");
	NSData *d=[fh readDataToEndOfFile]; // <-- read here!
	[t waitUntilExit];
	NSLog(@"done waiting");

Gerd

_______________________________________________

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: Re: FSFindFolder vs NSSearchPathForDirectoriesInDomains
  • Next by Date: NSTokenField bug in 10.5.2?
  • Previous by thread: Re: NSTask not completing
  • Next by thread: Using an auto incremented NSNumber as attribute in a NSManagedObject
  • Index(es):
    • Date
    • Thread