only remove pid if parent process is 1