in reply to Re^5: run a background processin thread run a background process
And had to use 'setsid' or the program dies whenever the web server goes down.