O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Convenience Functions

Starting new processes can be a powerful tool in your programming arsenal. Unix comes with a lot of little command-line utilities that perform useful functions. Sometimes it makes more sense to take advantage of these utilities rather than reimplementing their behavior. For example, you may have a Perl script that strips tags from HTML. If your application has a need for that kind of tag-stripping feature, it can be easier to start the Perl script and feed it your HTML rather than playing around with regular expression code in Objective-C.

The easiest way to start another program is to use the system() function. This will start a program, wait until it finishes, and then return the result code. system() actually passes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required