diff --git a/src/bucoord/commands.c b/src/bucoord/commands.c index 45217000c3..46e8dd6c8a 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); }