summaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-08-14 16:27:35 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-08-14 16:29:47 -0400
commitcb91d1539e4f7d935c5106dbf54a7d58b5f297d6 (patch)
tree5a4f5f580a46526aa2b0280754b6feb203d5039d /Utility
parent6c4c1a9bccfaa94525f343153b179c2170293686 (diff)
test: Avoid most situations involving failure to delete test directories
By forking a worker process and only deleting the test directory once it exits. This way, if a test leaves files open, they'll get closed when the worker exits, so avoiding failure to delete open files on Windows, and failure to delete directories due to NFS lock files. If a test leaves a git worker process running, the closed pipes should cause the worker to exit too, also avoiding the problem there. The 10 second sleep ought to give plenty of time for such worker processes to exit, although this is of course a race. Finally, even if test directory fails to be deleted still, it won't appear as if the last test in the test suite failed; the error will be displayed at the very end. This commit was supported by the NSF-funded DataLad project.
Diffstat (limited to 'Utility')
-rw-r--r--Utility/Misc.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Utility/Misc.hs b/Utility/Misc.hs
index 4498c0a03..2ae992874 100644
--- a/Utility/Misc.hs
+++ b/Utility/Misc.hs
@@ -112,7 +112,7 @@ hGetSomeString h sz = do
peekbytes :: Int -> Ptr Word8 -> IO [Word8]
peekbytes len buf = mapM (peekElemOff buf) [0..pred len]
-{- Reaps any zombie git processes.
+{- Reaps any zombie processes that may be hanging around.
-
- Warning: Not thread safe. Anything that was expecting to wait
- on a process and get back an exit status is going to be confused