Hey gang -
I've got a utility that digs around for log files, and depending on the
options chosen, will zip the log file up and/or delete the unzipped log file
(only works on log files not currently in use - i.e. today's for daily logs,
or this month's for monthly).
I'm getting "file in use" errors occasionally. What the utility does is,
once it identifies a log file to do its stuff on, runs the <CFX_ZIP> tag on
it, then does a <CFFILE> delete on the log file. But occasionally (and
there's no real rhyme or reason to it - it's rather random), the utility
will bomb out - the delete fails due to the log file being in use.
My first thought was that the zip process was "hanging onto" the log file in
some way - that the CFX_ZIP tag finishes up, but the OS is still winding up
its part while the CF server moves onto the delete process. So I tossed in a
little delay code, using GetTickCount and a loop to force a delay between
the zip and the delete. Started with 50ms, then up to 200ms. Yet, I'm still
getting the "file in use" error.
Anyone out there dealt with a similar situation?
--Scott
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists