Inso Reiges
Inso Reiges

Reputation: 1929

Cocoa: Launch console tool from Cocoa app

I have two applications:

1) A multithreaded cocoa gui app.

2) A unix command line tool.

I need to be able to launch the command line tool from cocoa app and capture everything it sends to stdout. The usual approach with fork/exec does not work - cocoa application crashes with "fork in multithread" exception. Any ideas?

Thanks, Inso.

Upvotes: 0

Views: 248

Answers (1)

Chuck
Chuck

Reputation: 237030

Use NSTask.

Upvotes: 2

Related Questions