• 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 + incomplete stdout at end of process
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSTask + incomplete stdout at end of process
      • From: Andrew Farmer <email@hidden>
References: 
 >NSTask + incomplete stdout at end of process (From: xEsk PiV <email@hidden>)

  • Prev by Date: performSelector:withObject fails with class object
  • Next by Date: Re: performSelector:withObject fails with class object
  • Previous by thread: NSTask + incomplete stdout at end of process
  • Next by thread: Re: NSTask + incomplete stdout at end of process
  • Index(es):
    • Date
    • Thread