test "$UNAME" = "Linux" || skip clean_scratch mkfifo scratch/{fever,pid,wait,running} ( # Create a zombie process cat scratch/fever >/dev/null & # Write the PID to scratch/pid echo $! >scratch/pid # Don't wait on the zombie process exec cat scratch/wait scratch/fever >scratch/running ) & # Kill the parent cat on exit defer kill -9 %1 # Read the child PID read -r pid scratch/wait & read -r _ /dev/null