Re: NSTask + incomplete stdout at end of process
Re: NSTask + incomplete stdout at end of process
- Subject: Re: NSTask + incomplete stdout at end of process
- From: Ken Thomases <email@hidden>
- Date: Fri, 6 Feb 2009 00:10:08 -0600
On Feb 5, 2009, at 10:48 PM, xEsk PiV wrote:
I'm using NSTask for executing a command line tool, but I'm having
some troubles getting the entire output.
I explain the situation:
1) When I execute the command line tool using the Terminal, the tool
while is working it displays an ASCII progress bar (single line).
I suspect the tool, or the library it is using for output (ncurses?),
is detecting whether or not its output is a terminal device (tty).
When you capture the output, the output is not a tty, so the tool
doesn't display the progress bar.
What happens if you run the tool at the shell but redirect its output
to: 1) a file, or 2) a pipe to 'less', 'more', or 'open -e'?
You can create a pseudo-tty if you really need to convince the tool
that its output is a tty. I don't know much about it, but I gather
it's not simple.
Cheers,
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