Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • scripts
  • Kconfig.include
Find file BlameHistoryPermalink
  • Masahiro Yamada's avatar
    kbuild: set EXIT trap before creating temporary directory · dd298656
    Masahiro Yamada authored Jul 28, 2022
    
    
    Swap the order of 'mkdir' and 'trap' just in case the subshell is
    interrupted between 'mkdir' and 'trap' although the effect might be
    subtle.
    
    This does not intend to make the cleanup perfect. There are more cases
    that miss to remove the tmp directory, for example:
    
     - When interrupted, dash does not invoke the EXIT trap (bash does)
    
     - 'rm' command might be interrupted before removing the directory
    
    I am not addressing all the cases since the tmp directory is harmless
    after all.
    
    Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
    Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
    dd298656
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7