Thanks for the help guys, the code is running fine with the fork/exec setup.
In reply to Re^4: Threads and MySQL by chrispete in thread Threads and MySQL by chrispete