Open landam opened 5 years ago
Comment by @landam on 2 Mar 2013 12:23 UTC No objections, feel free to implement it.
Comment by neteler on 4 Jan 2014 20:57 UTC (Un)related:
To avoid race conditions on high end systems, the use of PID is not save. For a new G_mktemp() implementation, see also ticket https://trac.osgeo.org/grass/ticket/2153
Modified by @landam on 12 May 2016 06:43 UTC
Modified by @landam on 23 Aug 2016 08:58 UTC
Comment by @landam on 27 Aug 2016 13:42 UTC Milestone renamed
Comment by mmetz on 11 Nov 2017 18:38 UTC The behaviour of a flag should not be changed within minor releases, bumping up to GRASS 8.
Reported by hamish on 2 Mar 2013 12:13 UTC Hi,
in grass7 there is a new
g.tempfile -d
flag to do a "dry run". It is used in core.py by grass.tempdir() to later make a directory by the returned string name. This has three things against it: 1) it causes a race condition. 2) it diverges from the usage of/bin/mktemp -d
, which is used to make a directory. 3) it's a lot more convoluted than just making the tempfile a directory in the first place, which is the only(?) known use of -d for dryrun.I propose that the -d flag in g.tempfile be changed to match mktemp's usage, i.e. make a directory instead.
It is not present in grass6, so there is not a backwards compatibility problem to change it now. I'd suggest that the -d flag to make a new directory would be useful to backport to grass6 once it is ready.
thanks, Hamish
ps- argh trac is logging out every 5 minutes again
GRASS GIS version and provenance
svn-trunk
Migrated-From: https://trac.osgeo.org/grass/ticket/1902