Source for Usenix Tournament GO Referee

Mark Weiser mark at tove.UUCP
Wed Apr 30 12:37:30 AEST 1986


Peter's go referee doesn't run on 2.x Suns because of his child timing
hack (for which he he predicts a day in hell for himself, of which this
posting is possibly the first minute).

(The second minute is the following: you must mkdir SUBS and GREF
before sh'ing his file.)

Here is the contextual diff that makes the program run on Suns, while
unfortunately breaking the child forking cheating check.
-------------------------------------------------------------
*** utime.c	Sun Apr 27 23:01:23 1986
--- utime.c.new	Sun Apr 27 22:54:34 1986
***************
*** 115,121
  	}
  	if (i >= nproc)		/* did we find the proc table entry? */
  	    return(0);
! 	ycptp = (int) p.p_cptr;
  	if (readusr(&p) == 0)
  	    return(0);
  	return(usr.u_ru.ru_utime.tv_sec);

--- 115,121 -----
  	}
  	if (i >= nproc)		/* did we find the proc table entry? */
  	    return(0);
! 	ycptp = 0;
  	if (readusr(&p) == 0)
  	    return(0);
  	return(usr.u_ru.ru_utime.tv_sec);
-------------------------------------------------------------
-mark
-- 
Spoken: Mark Weiser 	ARPA:	mark at maryland	Phone: +1-301-454-7817
CSNet:	mark at umcp-cs 	UUCP:	{seismo,allegra}!umcp-cs!mark
USPS: Computer Science Dept., University of Maryland, College Park, MD 20742



More information about the Comp.sources.unix mailing list