Re: [ANN] New NSTask sample
Re: [ANN] New NSTask sample
- Subject: Re: [ANN] New NSTask sample
- From: Gerben Wierda <email@hidden>
- Date: Fri, 14 Dec 2001 14:59:36 +0100
On Monday, December 10, 2001, at 08:04 , Matthew Formica wrote:
Folks,
A new sample showing how to call UNIX commands via NSTask has just gone
live:
http://developer.apple.com/samplecode/Sample_Code/Cocoa/Moriarity.htm
Regards,
- Matthew
I have been having problems with it 'out of the box'. It compiles and
runs, but it is very unreliable. matthew says it runs fine on his
machine. So I would request for a few people to do the following:
1. Download tis example and unpack it
2. if necessary: As root, run:
/usr/libexec/locate.updatedb to get an up to date locate database
3. Run the binary that is in the distribution
4. Enter 'Package' (without the quotes) in the search field.
5. Hit return (this will work)
6. Wait until it is finished.
7. Hit return again
Repeat steps 6 and 7 multiple times.
The behaviour I see is that on the nth try (within PB the 2nd, running
outside, the 3rd) the button changes status to 'Stop' but no output is
shown. Then again sometimes only a part of the output is shown and the
process seems to hang. And sometimes it works again. After enough tries
the app seems dead, but the last time this happened I looked and saw
that Moriarity was eating 80% CPU and locate was running.
Can people confirm this for me?
Thanks,