From: Pierre-Marc Fournier Date: Tue, 8 Sep 2009 20:43:48 +0000 (-0400) Subject: fix keepalive system X-Git-Tag: v0.1~151 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c472cce0f033b101297cb617af52b4b24e8e8c78;p=ust.git fix keepalive system --- 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; } }