Re: Intercepting console in an app
Re: Intercepting console in an app
- Subject: Re: Intercepting console in an app
- From: Greg Guerin <email@hidden>
- Date: Wed, 8 Jul 2009 08:55:27 -0700
Angelo Chen wrote:
I use NSTask to run a command line program(ffmpeg in this case),
NSPipe can't get the output from the program, but I can see those
messages from the Console during runtime, is there a way to grab
the Console output from a running cocoa app? Thanks,
Run the ffmpeg command in Terminal, and redirect stdout to a file.
If the output appears in the file, then a pipe should be able to
capture the output in NSTask. If not, then ffmpeg is explicitly
opening and writing to the console device (probably /dev/console).
You'd need source to fix that.
Also remember to run ffmpeg twice, once with redirected stdout, and
again with redirected stderr.
-- GG
_______________________________________________
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