clean_temp: not safe for concurrent use
|Reported by:||hamish||Owned by:|
|Keywords:||clean_temp init grass.py||Cc:|
if you do
$ grass65 -gui you will see that it prints "Cleaning up temporary files ..." from init.sh line # 415 devbr6).
i.e. before the interactive startup.
But the new LOCATION_NAME and MAPSET are not really finalized until after about line 711.
So it's a bummer if you startup another session of GRASS while you have some process running in the first (good chance the first is the mapset stored in .grassrc6) which is using temp files. Init.bat has similar issues, and I would guess that windows isn't as forgiving when you attempt to delete open files.
if it's a shell script running there's no guarantee that the file will be kept open between when it's written and when it's needed. could be a real pain for long running process to have .tmp disappear mid calculation.