From 008ef69aa1cbae4bad762e0cf244f95e697a59fc Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 22 Aug 2008 20:23:49 +0200 Subject: [PATCH] Internal errors are reported properly. --- box/box.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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"); -- 2.39.2