0

I know there is a lot of info out there on how to do this, but I was wondering if using NSTask is the best way to call command line arguments from a Cocoa App. Also, if I wanted to use something like "dns-sd ..." (something that doesn't end until interrupted or killed), would calling a kill on it using NSTask be the best way to close it?

Thanks!

hassaanm
  • 14,539
  • 4
  • 21
  • 20
  • I assume that you mean calling command line tools from a Cocoa app, not accessing command-line arguments for the running application? – sbooth Jul 03 '10 at 05:54

1 Answers1

0

You can also use fork and execv().

Leibowitzn
  • 830
  • 4
  • 6
  • Yeah, but that's exactly what `NSTask` uses (well, probably `fork` and `execve`), so why go to the bother of recreating `NSTask` functionality when it already exists for you? – Dave DeLong Jul 04 '10 at 16:31