simplify further: return asap on pid mismatch