Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with hanging and zombie jobs #675

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 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,11 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
command rm -f ${(v)PUAssocArray}
counter=0
PUAssocArray=()

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