lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> The call to os.remove() fails, reporting the file is locked by
> someprocess. If I add call to collectgarbage("collect") on line (*),
> os.remove() succeeds. Looks like dofile() keeps file open until GC.

This is very strange. dofile never creates any Lua object for the file.
Also, luaL_loadfile take pains to always close the file.

Are you sure the files are not open by some other process?o

Could you please post the actual code that has the problem (ideally the
minimal example that exhibits the problem)?

--lhf