Re: NSTask, NSPipe's and interactive UNIX command
Re: NSTask, NSPipe's and interactive UNIX command
- Subject: Re: NSTask, NSPipe's and interactive UNIX command
- From: "Mike Davis" <email@hidden>
- Date: Wed, 2 Jan 2002 10:57:52 -0500
Put the reader into a thread. It's what I did for Only Mortal
(
http://homepage.mac.com/only_mortal/) and it worked well.
You have to do some communication between the reader thread and the
application to get the data back for display but it's pretty trivial. I
think NSConnection has an example of it in there, though you will need a
machanism to kill the thread off when it blocks if the user quits the app
(invalidate the connection).