How can I execute a terminal command (like grep) from my Objective-C Cocoa application?
Custos Mortem said:
I'm surprised no one really got into blocking/non-blocking call issues
For blocking/non-blocking call issues regarding NSTask read below:
asynctask.m -- sample code that shows how to implement asynchronous stdin, stdout & stderr streams for processing data with NSTask
Source code of asynctask.m is available at GitHub.