Re: Running processes
Re: Running processes
- Subject: Re: Running processes
- From: Shawn Erickson <email@hidden>
- Date: Sat, 09 Sep 2006 08:11:59 -0700
On Sep 9, 2006, at 7:55 AM, Development wrote:
I know that I can use us the foundation framework to run a command
line utility. The problem is that about half of the output from one
of the utilities I need to run is lost. It just never reaches the
main application. However in another program I use the security
framework to run a command line utility and I use a FILE pointer to
retrieve the data from stdout and it works perfectly. So I am
wondering is there a way to run a command line utility where I use
a FILE pointer to retrieve the output that is similar to the
security framework without actually using that framework? I looked
at the primitive system() command but that does not accept a FILE
pointer.
Thanks for any help.
NSTask works if that is what you mean by "[using] foundation framework".
So either you are using NSTask incorrectly or the command you are
running is outputing some of its output to stderr.
Can you outline how you are using NSTask? If I had to guess (which I
do) I bet you wait on the process to terminate and continue on once
it does without correctly looping until you have no more data to read
from the NSPipe related to the task.
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden