NSTask + incomplete stdout at end of process
NSTask + incomplete stdout at end of process
- Subject: NSTask + incomplete stdout at end of process
- From: xEsk PiV <email@hidden>
- Date: Fri, 6 Feb 2009 05:48:58 +0100
Hi everyone.
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).
(Screenshot > http://img9.imageshack.us/img9/9928/terminallx6.png )
2) When I execute the command line tool using NSTask with no stdout
capturing, the Xcode 3.1 debug console displays the progress bar as a
multiple lines (each step is a new line into the Xcode debug console).
(Screenshot > http://img10.imageshack.us/img10/2329/xcodedebugconsolezl8.png
)
3) When I execute the command line tool using NSTask capturing the
stdout & stderr for parsing, the output is returned at end of process
and incomplete (the progress phase is "ignored", only the program
copyright and end message is returned). (Screenshot >
http://img301.imageshack.us/img301/7314/capturingstdoutzt6.png )
My question is: I need to do something special with this kind of
outputs? (I don't know how to define this kind of outputs,
"dynamics?"...)
My code is based on TaskWrapper - Moriarity
(http://developer.apple.com/samplecode/Moriarity/listing5.html) and
AMShellWrapper (http://www.harmless.de/download/AMShellWrapper.zip).
I also tried both examples, replacing their command tool for my
command tool... with the same result as my code! :( At end of process
I receive the output with the progress phase ignored.
If someone have some usefull information, it would be so apreciated!
Kind regards,
Xesc.
_______________________________________________
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