From: Martin Mares Date: Sun, 25 May 2008 21:42:36 +0000 (+0200) Subject: Clean up exit codes of judges. X-Git-Tag: python-dummy-working~155 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=2cee257dc401fa6a70208b5d71e4ea742b19c48a;p=moe.git Clean up exit codes of judges. exit(1) always means an error in the judged output, exit(2) is used whenever an internal error is encountered (missing files etc.). --- diff --git a/TODO b/TODO index 1ece4b0..db24292 100644 --- a/TODO +++ b/TODO @@ -11,7 +11,6 @@ box: memory usage statistics (need to search for VMPeak in /proc/$PID/status, bu Judges ~~~~~~ -clean up exit codes test cases for judge-shuff Environment diff --git a/judge/judge.h b/judge/judge.h index 3ac8e4c..8ba6adb 100644 --- a/judge/judge.h +++ b/judge/judge.h @@ -16,7 +16,7 @@ /* utils.c: Utility functions */ -void die(char *msg, ...) NONRET; +void die(char *msg, ...) NONRET; /* Dies with exit code 2 (judge error) */ void *xmalloc(size_t size); void *xrealloc(void *p, size_t size); diff --git a/judge/utils.c b/judge/utils.c index cbe5c3c..128e1fe 100644 --- a/judge/utils.c +++ b/judge/utils.c @@ -17,7 +17,7 @@ void die(char *msg, ...) vfprintf(stderr, msg, args); fputc('\n', stderr); va_end(args); - exit(1); + exit(2); } void *xmalloc(size_t size)