I'm looking for a working example of using fork() within a newly created pthread, where the child runs a process using execvp() & the parent thread waits for the child. The program must close without memory leaks.
I am close to a solution myself however I've run into a memory leak (valgrind) because the child process leaves behind memory from the fork'