]> mj.ucw.cz Git - eval.git/commitdiff
Better exit status checks.
authorMartin Mares <mj@ucw.cz>
Fri, 8 Jun 2001 15:24:54 +0000 (15:24 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 8 Jun 2001 15:24:54 +0000 (15:24 +0000)
src/iwrapper.c

index 19435e847896779d93afbcc84d155abd6312df70..3b31cbe235c2b4b751535cfe79656ce71f024eee 100644 (file)
@@ -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;
 }