while (getppid == $ppid) { # process until parent dies }