Determine PPID of shell if not already set.