On 12/18/13 4:42 AM, Matthias Steppuhn wrote: > > > Dear all, > > as I can't find a reference to a fix, I assume the glitch is still > present ; I learned by accident, that bash utilizes tempfiles, even for > herestrings and creates them in /tmp , ignoring any $TMPDIR setting. > > As a workaround for some strange application, I have to empty deleted files > in /tmp - and sometimes /tmp is really filled , the script fails if it's > needed most .... [...] > Bash Version: 3.2 > Patch Level: 51 > Release Status: release > > Description: > bash ignores $TMPDIR in heredoc and herestring , rendering my "/tmp > jammed script" to fail , as soon as it is needed ...
Bash-3.2 used the system tmpdir (P_tmpdir from stdlib.h, otherwise a set of common directories, each of which it requires to be writable) for here strings and here documents. Bash-4.0 and later use $TMPDIR but require that it name a writable directory. If it does not, it defaults to trying the same set of common directories as bash-3.2. The idea is that users do not need to know the implementation details of here documents and here strings, so bash makes every effort to find a usable directory for any temporary files it creates. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/