<div dir="ltr"><div><div><div>Hi,<br><br></div><div>when I was working on grass.py I saw there usage of clean_temp function which calls clean_temp program and deletion of the whole .tmp directory and I can't make sense out of it.<br></div><div><br>It seems to me that clean_temp (lib/init/clean_temp.c) executable called in grass.py is not necessary because the whole .tmp directory is anyway deleted at the beginning and at the end of the session. clean_temp is doing some special cleaning according to pids but whole directory is deleted anyway at the end. Can the whole lib/init/clean_temp.c can be safely removed? Or maybe it has some meaning when executed before the session starts because at that point .tmp is not deleted. Can someone please clarify this for me here or in the source code?<br><br></div>Also, the clean_temp function is called manually while other cleanups are called using at exit mechanism. Supposing we need the clean up at all, I'm not sure if there is any reason to keep it explicit. Perhaps this was just inconsistency, not an intention.<br><br></div>Thanks for your opinions,<br></div>Vaclav<br><br>Related code:<br><a href="http://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L1486">http://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L1486</a><br><a href="http://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L1741">http://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L1741</a><br><a href="http://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L1801">http://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L1801</a><br><a href="http://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L1702">http://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L1702</a><br><a href="https://trac.osgeo.org/grass/browser/grass/trunk/lib/init/clean_temp.c">https://trac.osgeo.org/grass/browser/grass/trunk/lib/init/clean_temp.c</a><br></div>