You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucy.apache.org by "Nick Wellnhofer (JIRA)" <ji...@apache.org> on 2013/02/18 22:25:12 UTC
[lucy-issues] [jira] [Updated] (LUCY-254) Creation of Charmonizer temp files
sometimes fails on Windows
[ https://issues.apache.org/jira/browse/LUCY-254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nick Wellnhofer updated LUCY-254:
---------------------------------
Description:
On Windows, a file won't be deleted until every open handle on it is closed. So if a file is deleted and immediately recreated with the same filename, the creation fails if another process (typically a virus scanner) still has an open handle on it. The solution is to create temporary files with unique names. I propose to add the following function to {{OperatingSystem.c}}:
{noformat}
char*
chaz_OS_temp_filename(const char *prefix, const char *ext);
{noformat}
It should simply add a number to the filename which is incremented on every call to that function.
was:
On Windows, a file can't be deleted if another process (typically a virus scanner) still has an open handle on it. The solution is to create temporary files with unique names. I propose to add the following function to {{OperatingSystem.c}}:
{noformat}
char*
chaz_OS_temp_filename(const char *prefix, const char *ext);
{noformat}
It should simply add a number to the filename which is incremented on every call to that function.
Summary: Creation of Charmonizer temp files sometimes fails on Windows (was: Deletion of Charmonizer temp files sometimes fails on Windows)
> Creation of Charmonizer temp files sometimes fails on Windows
> -------------------------------------------------------------
>
> Key: LUCY-254
> URL: https://issues.apache.org/jira/browse/LUCY-254
> Project: Lucy
> Issue Type: Bug
> Components: Charmonizer
> Reporter: Nick Wellnhofer
>
> On Windows, a file won't be deleted until every open handle on it is closed. So if a file is deleted and immediately recreated with the same filename, the creation fails if another process (typically a virus scanner) still has an open handle on it. The solution is to create temporary files with unique names. I propose to add the following function to {{OperatingSystem.c}}:
> {noformat}
> char*
> chaz_OS_temp_filename(const char *prefix, const char *ext);
> {noformat}
> It should simply add a number to the filename which is incremented on every call to that function.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira