On 10-07-13 16:06, Konstantin Tokarev wrote:
10.07.2013, 17:55, "Kees Bakker" <[email protected]>:Hi, After running creduce there are lots of temp files in TMPDIR (i.e. on Linux that is probably in /tmp.) I guess this is because of the kill ('TERM', -$pid); in the creduce Perl script. Shouldn't we try to kill the compiler in a more friendly way first? Perhaps with a TERM signal or something. That being said, I'm sure we need to have a fallback procedure and really do a TERM if the compiler doesn't want to be killed by TERM. Meanwhile I decided to create a fresh temporary directory before running creduce and cleanup that directory after creduce is done. Something like this: export TMPDIR=$(mktemp -d /tmp/mytempdir-XXXXXX) creduce .... [ -d "$TMPDIR" ] && rm -fr "$TMPDIR" -- Keesrm -rf /tmp/creduce-*
No this is not the problem. The /tmp/creduce-* directories are cleaned up nicely. I'm talking about temp files created by the compilers that are run from the script. Compilers (usually some control program) create temporary files, such as assembly and object files. Most compilers I know use TMPDIR for that. I get the impression that the creduce sometimes kills a compiler before it is finished. In that case its temp files are left behind. Again, these are not the temp files in /tmp/creduce-*. -- Kees
