I just posted this on <a href="http://gamedev.net">gamedev.net</a> before I noticed there was a mailing list, so here&#39;s a copy.<br><br><br>I have created a dll addon to a game(Enemy Territory). Inside that
addon I use the PhysFS file system. Great library btw. It recently came
to my attention that there appears to be a bug in linux with PhysFS.<br>
<br>
Here&#39;s a rundown of how it works.<br>
<br>
The game loads the dll newly every map change. Inside my dll I am
mounting 3 folders for use in my file system. During unloading of the
dll I call PHYSFS_deinit, which should release all mounted assets, I
have verified this is all getting called as expected.<br>
<br>
The problem is that every time the game re-loads the dll, despite the
previous load being PHYSFS_deinit&#39;ed, it doesn&#39;t seem to free the
handle to those 3 folders. the lsof command shows handles building up
and building up, until some of our users recently started reporting an
error with too many files open after running for several days.<br>
<br>
This seems like a PhysFS bug, as I would expect PHYSFS_deinit to free
those handles, as its documentation suggests as well. Anyone have any
ideas of how to fix this?<br>
<br>
Another interesting thing, though currently I file this under
differences in the file system. If I run process explorer for the same
process in windows, those 3 folders don&#39;t show up under the handles for
the process, so I&#39;m sort of assuming maybe the mounting process works
differently between windows and linux.<br><br>Thanks<br>Jeremy<br>