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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access