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.8.0_pre1^2~2957 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=6d6d52e18f3bd537331de6021a0fcc2e96fc48db;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. Change-Id: Ied49d0bf9f81b0e10804133c6f05814321d80438 Reviewed-on: http://gerrit.openafs.org/6223 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- diff --git a/src/bucoord/commands.c b/src/bucoord/commands.c index 45217000c..46e8dd6c8 100644 --- a/src/bucoord/commands.c +++ b/src/bucoord/commands.c @@ -914,11 +914,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) @@ -929,8 +928,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); }