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

Re: NSTask troubles


  • Subject: Re: NSTask troubles
  • From: Timothy Klein <email@hidden>
  • Date: Thu, 12 Jul 2007 17:50:13 -0600

On 12 Jul 2007, at 5:16 PM, Alastair Houghton wrote:

On 13 Jul 2007, at 00:04, John Stiles wrote:

Well, I think I understand what you're saying here—atos' output is queued up and not being sent back to me—but do you know how to work around the issue? Reading the docs, I only see two semi- promising approaches: do an fsync on the file descriptor, or call - synchronizeFile on the pipe's NSFileHandle.

I'll try these, but I'm still not sure why this would work fine on Intel…

It probably isn't the pipe buffer that's causing you trouble here.

If the problem is the output buffering in the C runtime (which I think you'll find it is), then neither of those will solve it. There are three fixes that will work:

I've had annoying and perplexing problems with NSTask as well, but this statement confuses me.


read() and write() are system calls into the kernel, no? And thus should not have any associated C-std-library buffers in the way, should they? ( They are in manual section 2, which is for system calls, and Steven's APUE lists them as unbuffered IO).

Is that right, or am I confused? Or is the buffering happening somewhere else? (and if so, *where*?).
--
Timothy Klein
email@hidden



_______________________________________________

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: NSTask troubles
      • From: John Stiles <email@hidden>
References: 
 >NSTask troubles (From: John Stiles <email@hidden>)
 >Re: NSTask troubles (From: Alastair Houghton <email@hidden>)
 >Re: NSTask troubles (From: John Stiles <email@hidden>)
 >Re: NSTask troubles (From: Alastair Houghton <email@hidden>)

  • Prev by Date: Re: NSTask troubles
  • Next by Date: Re: NSTask troubles
  • Previous by thread: Re: NSTask troubles
  • Next by thread: Re: NSTask troubles
  • Index(es):
    • Date
    • Thread