[Box Backup-commit] COMMIT r936 - box/chris/merge/test/backupstorepatch
subversion@fluffy.co.uk
subversion@fluffy.co.uk
Sat, 02 Sep 2006 12:06:13 +0100
Author: chris
Date: 2006-09-02 12:06:13 +0100 (Sat, 02 Sep 2006)
New Revision: 936
Modified:
box/chris/merge/test/backupstorepatch/testbackupstorepatch.cpp
Log:
(refs #3)
Cannot signal bbstored to housekeep immediately on Win32, so just wait
for it to happen.
Modified: box/chris/merge/test/backupstorepatch/testbackupstorepatch.cpp
===================================================================
--- box/chris/merge/test/backupstorepatch/testbackupstorepatch.cpp 2006-09-02 11:03:48 UTC (rev 935)
+++ box/chris/merge/test/backupstorepatch/testbackupstorepatch.cpp 2006-09-02 11:06:13 UTC (rev 936)
@@ -579,9 +579,18 @@
writedir.Commit(true);
}
- // Send the server a restart signal, so it does housekeeping immedaitely, and wait for it to happen
- ::sleep(1); // wait for old connections to terminate
+#ifdef WIN32
+ // Cannot signal bbstored to do housekeeping now,
+ // so just wait until we're sure it's done
+ wait_for_operation(12);
+#else
+ // Send the server a restart signal, so it does
+ // housekeeping immediately, and wait for it to happen
+ // Wait for old connections to terminate
+ ::sleep(1);
::kill(pid, SIGHUP);
+#endif
+
// Get the revision number of the info file
int64_t first_revision = 0;
RaidFileRead::FileExists(0, "backup/01234567/o01", &first_revision);