The only point of system(3) is to invoke the OS shell, if you do not want that use exec(3).