• 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 and NSPipe has buffering issues?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask and NSPipe has buffering issues?


  • Subject: Re: NSTask and NSPipe has buffering issues?
  • From: "Mr. Gecko" <email@hidden>
  • Date: Tue, 31 Jul 2012 18:28:53 -0500

What do you recommend after the task finishes? I have tried [[outPipe fileHandleForReading] readDataToEndOfFile] after the task finishes and it doesn't seem to improve. Can you maybe give me an example of how to do this right?

On Jul 31, 2012, at 6:01 PM, Wim Lewis <email@hidden> wrote:

> I haven't looked at the code you posted, but is it possible that you're reading from the NSPipe in such a way that you're mixing up the "end-of-file" indication with the "no more data is available right now, but may arrive later" indication? That's a common reason for this kind of problem.
>
> IIRC, NSPipe simply wraps a Unix pipe, which will hold unread data even after the writer closes its end of the pipe (that is, the writer can write some data and exit before the reader reads anything, and the reader will still get all the data followed by EOF).

_______________________________________________

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 and NSPipe has buffering issues? (From: "Mr. Gecko" <email@hidden>)
 >Re: NSTask and NSPipe has buffering issues? (From: Wim Lewis <email@hidden>)

  • Prev by Date: Re: NSTask and NSPipe has buffering issues?
  • Next by Date: Re: NSTask and NSPipe has buffering issues?
  • Previous by thread: Re: NSTask and NSPipe has buffering issues?
  • Next by thread: Re: NSTask and NSPipe has buffering issues?
  • Index(es):
    • Date
    • Thread