"The path to the program is also definately in my .bashrc file"? What do you mean? And more to the point, why should that matter? After all, .bashrc is only sourced for interactive shells, and even if your system() call were using a shell, it wouldn't be an interactive one.