Fourth attempt at storing the pid