How long does your sub-program take to run?
What I'm wondering is if it has to be "owned" by something, either your main program or a terminal window...
My thought being that you called this sub-program and it's parent (your program) exited before it ran but with
a terminal window loaded calling system() meant it could run because the terminal owned it and stayed open long enough.