tmf: Close the state history files before deleting them
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Thu, 12 Jul 2012 13:29:11 +0000 (09:29 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Thu, 12 Jul 2012 18:32:01 +0000 (14:32 -0400)
commit3de6023665e36d93d453680aee6319187e17b2f9
tree3b0875c33eb3d27e739ef6fe463a28409067f5f9
parentc6e5dfa02b37fed28443224d7e46e90989d46b7f
tmf: Close the state history files before deleting them

When a state history construction gets cancelled, we delete the
partial files, so we are not stuck with an incomplete file that
looks exactly like a complete and valid one.

However, we should close the file descriptors before attempting the
deletion. On Linux, lsof would still report the descriptors to the
deleted files after we stopped using them. On Windows it was even
worse, the deletion would fail because the file lock was still taken.

Change-Id: I29d0bf39621bdf6713bb2c3fe908e16f8d4f2bcc
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/historytree/HT_IO.java
This page took 0.028071 seconds and 5 git commands to generate.