From d517fdc5986fd899004b6fbc92ea4aae4d002561 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 8 Jun 2001 15:24:54 +0000 Subject: [PATCH] Better exit status checks. --- src/iwrapper.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/iwrapper.c b/src/iwrapper.c index 19435e8..3b31cbe 100644 --- a/src/iwrapper.c +++ b/src/iwrapper.c @@ -150,18 +150,21 @@ main(int argc, char **argv) if (!WIFEXITED(sbox)) die("Sandbox fault, status=%x", sbox); - if (!WIFEXITED(schk)) + if (!WIFEXITED(schk) || WEXITSTATUS(schk) >= 100) die("Checker fault, status=%x", schk); if (WEXITSTATUS(sbox)) { copy(boxepipe[0]); + copy(chkepipe[0]); return 1; } else if (WEXITSTATUS(schk)) { copy(chkepipe[0]); + copy(boxepipe[0]); return 1; } copy(boxepipe[0]); + copy(chkepipe[0]); return 0; } -- 2.39.2