It depends on whether
your program needs the output of the command you run.
If you don't need the output, then redirect stdout and stderr for the command. Say, for instance, you need to run a system script (/usr/local/do_something) to start a program. You would execute it like so:
Code:
system("/usr/local/do_something >/dev/null 2>&1")
If your program does need the output, then you can use the popen() function. You should be able to read about it with
man popen.