#!/usr/bin/bash

set -euo pipefail

name="${!#}"
case ",${PANAMA_DOCTOR_FIXTURE_PROCESSES:-}," in
    *",$name:duplicate,"*) printf '4101\n4102\n' ;;
    *",$name:malformed,"*) printf 'not-a-pid\n' ;;
    *",$name:missing,"*) exit 1 ;;
    *) printf '4101\n' ;;
esac
