added a global list to hold processes, return pid to console.