• 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: Active Read/Write of NSTask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Active Read/Write of NSTask


  • Subject: Re: Active Read/Write of NSTask
  • From: Ken Thomases <email@hidden>
  • Date: Thu, 8 Oct 2009 18:15:23 -0500

On Oct 6, 2009, at 6:30 PM, Kevin Ferguson wrote:

I am running into a problem when the binary to be executed contains a scanf statement. I want the user to see results and type in input in real time (like the debugger for standard C tools in xcode). The issue is that as soon as the task hits the scanf statement, the read pipe blocks, so I can't read from it to get data to that point, nor can I tell when it blocks in order to prompt the user for input (preferably using the output up to that point). I know it can be done, I am just completely in the dark as to how/what classes to consider.

Any ideas on how to accomplish what I'm after?

You may have to use a pseudo-terminal (ptty) rather than pipes to achieve what you're after.


Regards,
Ken

_______________________________________________

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: 
 >Active Read/Write of NSTask (From: Kevin Ferguson <email@hidden>)

  • Prev by Date: Re: Alert prompts for BetterAuthorizationSample
  • Next by Date: Hide an Item on Desktop
  • Previous by thread: Re: Active Read/Write of NSTask
  • Next by thread: NSOpenPanel Performance the Second Time
  • Index(es):
    • Date
    • Thread