Skip to content

Commit e1333e3

Browse files
committed
Fix issues with hanging and zombie jobs
1 parent 0c471af commit e1333e3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

zinit-autoload.zsh

+5-2
Original file line numberDiff line numberDiff line change
@@ -2981,7 +2981,6 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
29812981
PUAssocArray[$!]=$PUFILE
29822982

29832983
.zinit-wait-for-update-jobs plugins
2984-
29852984
}
29862985
}
29872986
# Shouldn't happen
@@ -3200,7 +3199,8 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
32003199

32013200
integer pager_pid=$!
32023201
{ sleep 20 && kill -9 $pager_pid 2>/dev/null 1>&2; } &!
3203-
{ wait $pager_pid; } > /dev/null 2>&1
3202+
integer kill_pager_pid=$!
3203+
{ wait $pager_pid; kill -9 $kill_pager_pid; } >/dev/null 2>&1
32043204

32053205
local -a log
32063206
{ log=( ${(@f)"$(<$local_dir/.zinit_lastupd)"} ); } 2>/dev/null
@@ -3562,6 +3562,9 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
35623562
command rm -f ${(v)PUAssocArray}
35633563
counter=0
35643564
PUAssocArray=()
3565+
3566+
# Clear zombie jobs.
3567+
wait
35653568
} elif (( counter == 1 && !OPTS[opt_-q,--quiet] )) {
35663569
+zi-log "{obj}Spawning the next{num}" \
35673570
"${OPTS[value]}{obj} concurrent update jobs" \

0 commit comments

Comments
 (0)