Skip to content

Commit

Permalink
delete files in /tmp created by zsh-bench-user
Browse files Browse the repository at this point in the history
  • Loading branch information
romkatv committed Nov 13, 2021
1 parent f70c7a2 commit c17587c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/install-config
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ function delete-user() {
if pids=($(command ps -u $user -o pid= 2>/dev/null)) && (( $#pids )); then
kill -- $pids 2>/dev/null || true
fi
{
{ command rm -rf -- '' /tmp/**/*(Nu[$user]) } 2>/dev/null || true
} always {
TRY_BLOCK_ERROR=0
}
try-delete-user &>/dev/null && return
zselect -t $((100 * delay)) || true
(( delay *= 2 ))
Expand Down

0 comments on commit c17587c

Please sign in to comment.