Skip to content

Commit

Permalink
Fix issues with hanging and zombie jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Juici committed Oct 20, 2024
1 parent 0c471af commit e1333e3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions zinit-autoload.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2981,7 +2981,6 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
PUAssocArray[$!]=$PUFILE

.zinit-wait-for-update-jobs plugins

}
}
# Shouldn't happen
Expand Down Expand Up @@ -3200,7 +3199,8 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"

integer pager_pid=$!
{ sleep 20 && kill -9 $pager_pid 2>/dev/null 1>&2; } &!
{ wait $pager_pid; } > /dev/null 2>&1
integer kill_pager_pid=$!
{ wait $pager_pid; kill -9 $kill_pager_pid; } >/dev/null 2>&1

local -a log
{ log=( ${(@f)"$(<$local_dir/.zinit_lastupd)"} ); } 2>/dev/null
Expand Down Expand Up @@ -3562,6 +3562,9 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
command rm -f ${(v)PUAssocArray}
counter=0
PUAssocArray=()

# Clear zombie jobs.
wait
} elif (( counter == 1 && !OPTS[opt_-q,--quiet] )) {
+zi-log "{obj}Spawning the next{num}" \
"${OPTS[value]}{obj} concurrent update jobs" \
Expand Down

0 comments on commit e1333e3

Please sign in to comment.