new option -o
[fw/sdcc] / support / regression / fwk / lib / timeout.c
index b853124b98cb1a7286d26b0cfbc7cb8284a83927..899d247c8171743aa6a143399febf34aa33d21f5 100644 (file)
 
 #define USAGE PROGNAME " : 1.00\n" \
               "Usage : " PROGNAME " timeout_in_seconds filename [arguments]\n" \
-              "  ´filename´ is executed, the arguments are passed to ´filename´.\n" \
-              "  When ´filename´exits before the timeout expires, the\n" \
-              "  exit-status of ´filename´ is returned.\n" \
-              "  When the timeout expires before ´filename´ exits, ´filename´\n" \
+              "  \"filename\" is executed, the arguments are passed to \"filename\".\n" \
+              "  When \"filename\" exits before the timeout expires, the\n" \
+              "  exit-status of \"filename\" is returned.\n" \
+              "  When the timeout expires before \"filename\" exits, \"filename\"\n" \
               "  will be killed and an exit-status of 1 is returned.\n"
 
 /* First the program tries to limit the maximum CPU-time to the timeout-value.
 #include <signal.h>
 #include <stdio.h>
 #include <sys/wait.h>
-#include <unistd.h>
 #include <sys/types.h>
+#include <sys/time.h>
 #include <sys/resource.h>
+#include <unistd.h>
 
 /* Get the status from all child processes that have terminated, without ever waiting.
    This function is designed to be a handler for SIGCHLD, the signal that indicates
@@ -162,3 +163,4 @@ main (int argc, char * const *argv)
         }
     }
 }
+