code: func pollParent(t time.Duration) {
  	for initial := os.Getppid(); initial == os.Getppid(); time.Sleep(t) {
  	}
  }
docs: // pollParent checks every t that the ppid of the current
  // process has not changed (i.e that the process has not
  // been orphaned). It returns as soon as that ppid changes.