macoscommand-line

Mac OS X: How to silently start a "Command Line Tool" type of application


Using Xcode 4.6, I created a "Command Line Tool" application (let's call this toolA). In that application, I want to execute another "Command Line Tool" application (toolB). I use the system() function like below:

system("open \"/usr/bin/toolB\"");

It works well except that it brings up a Terminal window when executing toolB. How can I hide the Terminal window or use another way to invoke toolB so it won't show the Terminal window at all?


Solution

  • Try:

    system('command &');
    

    & puts a process into the background.