Skip to content
Snippets Groups Projects
  • Luke Shumaker's avatar
    997bc1dc
    lib/common.sh: add 'lock_close'; use it as appropriate. · 997bc1dc
    Luke Shumaker authored
    `lock_close FD` is easier to remember than 'exec FD>&-`; and is especially
    easier if FD is a variable (though that isn't actually taken advantage of
    here).
    
    This uses Bash 4.1+ `exec {var}>&-`, rather than the clunkier
    `eval exec "$var>&-"` that was necessary in older versions of Bash.
    Thanks to Dave Reisner for pointing this new bit of syntax out to me
    the last time I submitted this (back in 2014, 4.1 had just come out).
    997bc1dc
    History
    lib/common.sh: add 'lock_close'; use it as appropriate.
    Luke Shumaker authored
    `lock_close FD` is easier to remember than 'exec FD>&-`; and is especially
    easier if FD is a variable (though that isn't actually taken advantage of
    here).
    
    This uses Bash 4.1+ `exec {var}>&-`, rather than the clunkier
    `eval exec "$var>&-"` that was necessary in older versions of Bash.
    Thanks to Dave Reisner for pointing this new bit of syntax out to me
    the last time I submitted this (back in 2014, 4.1 had just come out).
Code owners
Assign users and groups as approvers for specific file changes. Learn more.