We checked against the wrong process for one case, that in turn meant a specific
pattern of activity could mess up when it tried to swap out a zombie process
if (c->p_status == P_READY)
r = c;
if (c->p_status > P_READY
- && p->p_status <= P_FORKING) {
+ && c->p_status <= P_FORKING) {
/* relative position in order of waits, bigger is longer, can wrap but
shouldn't really matter to us much if it does */
s = (waitno - c->p_waitno);