Re: Moriarity samplecode (taskwrapper)
Re: Moriarity samplecode (taskwrapper)
- Subject: Re: Moriarity samplecode (taskwrapper)
- From: email@hidden (Jody Fairchild)
- Date: Wed, 09 Jan 2002 12:30:27 +0900
on Tue, 8 Jan 2002 09:39:07 +0100, in digest #1061, Gerben Wierda wrote:
>
And don't forget that version 1.0 (Dec 6) of Moriarity is broken. The
>
code has been fixed but last time I looked the site had not been updated
>
yet.
i'm not sure what aspect of the code gerben is talking about, but in the
course of adapting the task wrapper stuff to my own purposes, i discovered
what seems to be a bug in the getData method.
in my usage of the task wrapper sample code, this bug was causing the app
to keep attempting to read from the filehandle even after there was no
data available and the NSTask had finished. i noticed it because the app
was suddenly eating 70% of my cpu time when it should have been sitting
idle.
i also needed to modify the code to be able to deal with all the stdio
filehandles separately (moriarity's taskwrapper doesn't deal with stdin at
all, and combines stdout and stderr on output), and report the return
value from the external process. if anyone's interested, i'd be happy to
pass along my version via email. if there ends up being some demand for
it, i can toss it up on the web somewhere.
-jf