From: Martin Mares Date: Fri, 31 Jul 2009 18:56:01 +0000 (+0200) Subject: Box: Do not report all errors as "during startup" if syscalls are not filtered. X-Git-Tag: python-dummy-working~101 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=e707d3466b88637003cdfa7463300df8f47aa845;p=moe.git Box: Do not report all errors as "during startup" if syscalls are not filtered. --- 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;