After a bit more investigation, I can say that the root cause of the
problem is the antivirus software not releasing the exe file generated in
createData() in time for the next call.  If the antivirus is disabled then
all tests pass.

Rather than wait for the official method, here's a patch with a working
solution for comment.

The solution is to add a sub "delete_temp_files" which will wait for two
seconds if the unlink is unsuccessful and then tries again.  I've replaced
all calls to unlink with delete_temp_files(), which is probably overkill
since it's the exe file creation that is raising the errors.  A more
minimalist change is to apply the sleep() approach within createData().

An alternative is to generate a new exe temp file name each time, as it is
only used inside createData() and it is the root cause of the problems.

Regards,
Shawn.



On 27 October 2015 at 07:21, Shawn Laffan <[email protected]> wrote:

> Can do.  Is there a preferred method?  e.g. patch against SF or Github
> repo, pull request, etc.
>
> Regards,
> Shawn.
>
>
> On 26 October 2015 at 23:16, Chris Marshall <[email protected]>
> wrote:
>
>>
>> On Mon, Oct 26, 2015 at 5:17 AM, Shawn Laffan <[email protected]>
>> wrote:
>>
>>>
>>> The simplest solution is probably to generate a temp file for each
>>> test.  Or maybe there is something even simpler I am missing.
>>>
>>>
>>>
>> I don't think so.  Patches/fixed code welcome.
>>
>> --Chris
>>
>>
>

Attachment: flexraw_fortran_file_cleanup.patch
Description: Binary data

------------------------------------------------------------------------------
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general

Reply via email to