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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to