From c472cce0f033b101297cb617af52b4b24e8e8c78 Mon Sep 17 00:00:00 2001 From: Pierre-Marc Fournier Date: Tue, 8 Sep 2009 16:43:48 -0400 Subject: [PATCH] fix keepalive system --- libust/tracectl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libust/tracectl.c b/libust/tracectl.c index 61a5392..412cca2 100644 --- a/libust/tracectl.c +++ b/libust/tracectl.c @@ -1085,15 +1085,15 @@ int restarting_usleep(useconds_t usecs) static void __attribute__((destructor)) keepalive() { if(trace_recording() && buffers_to_export) { + int total = 0; DBG("Keeping process alive for consumer daemon..."); while(buffers_to_export) { const int interv = 200000; - int total = 0; - restarting_usleep(20000); + restarting_usleep(interv); total += interv; if(total >= 3000000) { - WARN("non-consumed buffers remaining after limit; not waiting anymore"); + WARN("non-consumed buffers remaining after wait limit; not waiting anymore"); break; } } -- 2.34.1