Re: Active Read/Write of NSTask
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