X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=box%2Fbox.c;h=892cc53eb9b8bee98fb369f7b4e8810a342375ad;hb=4ee9f1ead0d2ef8133a8f1f692816b78d038ab4e;hp=b4f47ef05300c96b0c7aba4ca2555ceb93475cb0;hpb=7e45f095c27e00114e57d97ea1b70a5900dd65af;p=moe.git diff --git a/box/box.c b/box/box.c index b4f47ef..892cc53 100644 --- a/box/box.c +++ b/box/box.c @@ -830,23 +830,27 @@ sample_mem_peak(void) static void boxkeeper(void) { - int syscall_count = 0; + int syscall_count = (filter_syscalls ? 0 : 1); struct sigaction sa; is_ptraced = 1; + bzero(&sa, sizeof(sa)); sa.sa_handler = signal_int; sigaction(SIGINT, &sa, NULL); + gettimeofday(&start_time, NULL); ticks_per_sec = sysconf(_SC_CLK_TCK); if (ticks_per_sec <= 0) die("Invalid ticks_per_sec!"); + if (timeout || wall_timeout) { sa.sa_handler = signal_alarm; sigaction(SIGALRM, &sa, NULL); alarm(1); } + for(;;) { struct rusage rus;