diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-12-02 22:51:07 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-12-02 22:51:07 +0000 |
commit | 79a19337f07ae8f0d55a6cb4aeafa648b1c36dd0 (patch) | |
tree | 4e9cd3f0cb9a231896a7c5a5641ac5138af7a54a /lib | |
parent | 99d5e37ca9d6485673d8afcf92f90e5ea671cf80 (diff) |
Slightly improve output from waiting methods.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/common/Test.h | 4 | ||||
-rw-r--r-- | lib/server/ServerControl.h | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/common/Test.h b/lib/common/Test.h index e43a518b..66e7fc7f 100644 --- a/lib/common/Test.h +++ b/lib/common/Test.h @@ -419,7 +419,7 @@ inline void terminate_bbackupd(int pid) // Wait a given number of seconds for something to complete inline void wait_for_operation(int seconds) { - printf("waiting: "); + printf("Waiting: "); fflush(stdout); for(int l = 0; l < seconds; ++l) { @@ -427,7 +427,7 @@ inline void wait_for_operation(int seconds) printf("."); fflush(stdout); } - printf("\n"); + printf(" done.\n"); fflush(stdout); } diff --git a/lib/server/ServerControl.h b/lib/server/ServerControl.h index d5b92b56..50e1c816 100644 --- a/lib/server/ServerControl.h +++ b/lib/server/ServerControl.h @@ -155,26 +155,26 @@ inline bool KillServer(int pid) for (int i = 0; i < 30; i++) { - if (!ServerIsAlive(pid)) break; - ::sleep(1); - if (!ServerIsAlive(pid)) break; - if (i == 0) { - printf("waiting for server to die"); + printf("Waiting for server to die: "); } printf("."); fflush(stdout); + + if (!ServerIsAlive(pid)) break; + ::sleep(1); + if (!ServerIsAlive(pid)) break; } if (!ServerIsAlive(pid)) { - printf("done.\n"); + printf(" done.\n"); } else { - printf("failed!\n"); + printf(" failed!\n"); } fflush(stdout); |