From: Martin Mares Date: Fri, 8 Jun 2001 15:24:54 +0000 (+0000) Subject: Better exit status checks. X-Git-Tag: python-dummy-working~503 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=d517fdc5986fd899004b6fbc92ea4aae4d002561;p=moe.git Better exit status checks. --- 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; }