BIC-MNI / minc-tools

Basic minc-tools from former minc repository
Other
29 stars 25 forks source link

Tempdir handling by various MINC tools #105

Closed zijdenbos closed 4 years ago

zijdenbos commented 4 years ago

Several of the MINC shell scripts generate temporary files/dirs that are solely based on pid. This can lead to name clashes with past runs on the same host, if these tempdirs/files were not cleaned up (which can happen under various circumstances - qdel being one of them). This in turn would cause these tools to crash when they shouldn't have. Specifically, these are affected:

mincdiff mincedit mincheader

In addition, some of these create their temporary dir even when it is not needed or used (mostly to decompress - outdated - externally compressed .mnc.gz files), which creates a bit of unnecessary I/O.

Suggest to improve the tempdir/file handling in these tools to be more robust. @gdevenyi suggested to use "mktemp -d".

gdevenyi commented 4 years ago

Fixed.