]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Print "waiting for job termination" at most once.
authorKarl Ramm <kcr@1ts.org>
Sun, 4 Dec 2011 18:56:29 +0000 (13:56 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Sat, 30 Mar 2013 17:46:36 +0000 (10:46 -0700)
This message is useless, annoying, and is the UI equivalent of littering... but
it does explain why your backup command is just sitting there.

Reviewed-on: http://gerrit.openafs.org/6223
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit 6d6d52e18f3bd537331de6021a0fcc2e96fc48db)

Change-Id: Ide51c7ef7c40426f34a5f1cb6c23395b0d93886a
Reviewed-on: http://gerrit.openafs.org/9438
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/bucoord/commands.c

index ac9dcbb01f00160f9735d4631c25644fb0706a2b..a1c1385f9f497b09bfbb29af565ef6eecc460c10 100644 (file)
@@ -926,11 +926,10 @@ bc_WaitForNoJobs(void)
 {
     int i;
     int usefulJobRunning = 1;
+    int printWaiting = 1;
 
     extern dlqlinkT statusHead;
 
-    afs_com_err(whoami, 0, "waiting for job termination");
-
     while (usefulJobRunning) {
        usefulJobRunning = (dlqEmpty(&statusHead) ? 0 : 1);
        if (dispatchLock.excl_locked)
@@ -941,8 +940,13 @@ bc_WaitForNoJobs(void)
        }
 
        /* Wait 5 seconds and check again */
-       if (usefulJobRunning)
+       if (usefulJobRunning) {
+            if (printWaiting) {
+                afs_com_err(whoami, 0, "waiting for job termination");
+                printWaiting = 0;
+            }
            IOMGR_Sleep(5);
+        }
     }
     return (lastTaskCode);
 }