Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
S slapos.recipe.cmmi
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • nexedi
  • slapos.recipe.cmmi
  • Merge requests
  • !8

Merged
Created Oct 04, 2018 by Jérome Perrin@jeromeOwner

Do not set any TMP environment variables

  • Overview 9
  • Commits 2
  • Pipelines 2
  • Changes 2

This reverts daa833ea ( !3 (merged) ) and extend it to not set $TMP either.

De facto, setting only $TMP was never effective ( see also #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:

tmpdir=$(mktemp -d)
trap 'rm -rf $tmpdir' SIGINT SIGTERM
TEMP=$tmpdir TMPDIR=$tmpdir TMP=$tmpdir buildout
rm -rf $tmpdir
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: fix/tmpdir-golang
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7