Open GoogleCodeExporter opened 9 years ago
We should also consider dropping a .task/.pid/.args file(s) in there so that
another process (possibly after a machine reboot) can identify that all of
these private temp dirs are no longer in use and can be safely deleted.
It may also be worth using PendMoves on windows machines to pend-delete the
.pid files from these directories. Then we can identify the directories by name
and nuke the ones without a .pid file. This allows us to not worry about 'kill
0' functionality on windows.
In the normal (non-reboot) case, the task runner would just delete the .pid
file.
Probably something like:
for dir in TEMP/*.swarming_task:
if !exists(dir/.pid) || kill(0, read(dir/.pid)):
rm -rf dir
$dir = mkdtemp
write_pidfile($dir)
pend_delete_pidfile($dir)
mv $dir $dir.swarming_task
env[TEMP] = $dir.swarming_task
Original comment by iannucci@chromium.org
on 18 Sep 2014 at 9:23
Original comment by maruel@chromium.org
on 2 Dec 2014 at 7:53
Original issue reported on code.google.com by
maruel@chromium.org
on 18 Sep 2014 at 7:05