From: Karl Ramm Date: Sun, 4 Dec 2011 18:56:29 +0000 (-0500) Subject: Print "waiting for job termination" at most once. X-Git-Tag: upstream/1.6.3^2~56 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=ef07580783ad7a7fa70bb41c27225d429865cdaa;p=packages%2Fo%2Fopenafs.git Print "waiting for job termination" at most once. 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 Reviewed-by: Jeffrey Altman (cherry picked from commit 6d6d52e18f3bd537331de6021a0fcc2e96fc48db) Change-Id: Ide51c7ef7c40426f34a5f1cb6c23395b0d93886a Reviewed-on: http://gerrit.openafs.org/9438 Reviewed-by: Derrick Brashear Tested-by: Andrew Deason Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand --- diff --git a/src/bucoord/commands.c b/src/bucoord/commands.c index ac9dcbb01..a1c1385f9 100644 --- a/src/bucoord/commands.c +++ b/src/bucoord/commands.c @@ -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); }