From e707d3466b88637003cdfa7463300df8f47aa845 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 31 Jul 2009 20:56:01 +0200 Subject: [PATCH] Box: Do not report all errors as "during startup" if syscalls are not filtered. --- box/box.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.39.2