added reparenting code to proc_cleanup