From: Martin Mares Date: Fri, 22 Aug 2008 18:23:49 +0000 (+0200) Subject: Internal errors are reported properly. X-Git-Tag: python-dummy-working~144 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=008ef69aa1cbae4bad762e0cf244f95e697a59fc;p=eval.git Internal errors are reported properly. --- diff --git a/box/box.c b/box/box.c index 09f7fe4..5bf43b3 100644 --- a/box/box.c +++ b/box/box.c @@ -799,11 +799,18 @@ boxkeeper(void) { box_pid = 0; final_stats(&rus); - // FIXME: If the process has exited before being ptraced, signal an internal error if (WEXITSTATUS(stat)) { - meta_printf("exitcode:%d\n", WEXITSTATUS(stat)); - err("RE: Exited with error status %d", WEXITSTATUS(stat)); + if (syscall_count) + { + meta_printf("exitcode:%d\n", WEXITSTATUS(stat)); + err("RE: Exited with error status %d", WEXITSTATUS(stat)); + } + else + { + // Internal error happened inside the child process and it has been already reported. + box_exit(2); + } } if (timeout && total_ms > timeout) err("TO: Time limit exceeded");