fix keepalive system
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Tue, 8 Sep 2009 20:43:48 +0000 (16:43 -0400)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Tue, 8 Sep 2009 20:43:48 +0000 (16:43 -0400)
libust/tracectl.c

index 61a5392174fac31377117ae42ab77f188c22c651..412cca2b1cfdb1b4969cbaeb030f170ae871b988 100644 (file)
@@ -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;
                        }
                }
This page took 0.0243 seconds and 4 git commands to generate.