• Jérome Perrin's avatar
    Do not set any TMP environment variables · 9ca803bb
    Jérome Perrin authored
    This reverts daa833ea ( !3 ) and extend it to not set `$TMP` either.
    
    De facto, setting only `$TMP` was never effective ( see also [#20120530-132221B](https://nexedi.erp5.net/bug_module/20120530-132221B) ) and as we saw in !3 (comment 67059) it causes more harm than good.
    
    The conclusion so far is that environment variables related to temporary files should be handled by the parent process. The parent process is responsible for providing a directory short enough so that we can create unix sockets in `$TMPDIR`  and to clean up this directory afterwards.
    
    
    In a pure buildout it could be:
    
    ```bash
    tmpdir=$(mktemp -d)
    trap 'rm -rf $tmpdir' SIGINT SIGTERM
    TEMP=$tmpdir TMPDIR=$tmpdir TMP=$tmpdir buildout
    rm -rf $tmpdir
    ```
    
    /reviewed-on !8
    9ca803bb
__init__.py 21 KB