• 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: Moriarity samplecode (taskwrapper)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moriarity samplecode (taskwrapper)


  • Subject: Re: Moriarity samplecode (taskwrapper)
  • From: Gerben Wierda <email@hidden>
  • Date: Wed, 9 Jan 2002 22:22:25 +0100

On Wednesday, January 9, 2002, at 04:30 , Jody Fairchild wrote:

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.

Yes, that is the second bug I discovered.

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.

There was another bug in the original code where the TaskWrapper is never deallocated and reused (and it cannot handle that so results are mixed). You can see that by trying to run Moriarity more than once. That one was fixed by the author at Apple as well. It just hasn't made it to the web site yet (last time I checked).

G


References: 
 >Re: Moriarity samplecode (taskwrapper) (From: email@hidden (Jody Fairchild))

  • Prev by Date: Re: Authorize login to router
  • Next by Date: Idle time
  • Previous by thread: Re: Moriarity samplecode (taskwrapper)
  • Next by thread: Authorize login to router
  • Index(es):
    • Date
    • Thread