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

[bug]: zinit update --parallel leaves some zombie background process #627

Open
vladdoster opened this issue Jan 22, 2024 Discussed in #499 · 1 comment · May be fixed by #675
Open

[bug]: zinit update --parallel leaves some zombie background process #627

vladdoster opened this issue Jan 22, 2024 Discussed in #499 · 1 comment · May be fixed by #675
Assignees
Labels
bug Something isn't working

Comments

@vladdoster
Copy link
Member

Discussed in #499

Originally posted by OmeletWithoutEgg April 12, 2023
There is a option to update the plugins parallelly. Is it normal that, after running zinit update --parallel, it will leave some uncleaned child process? One can run fg or just run the parallel update in a shell inside another shell and exit.

@vladdoster vladdoster added the bug Something isn't working label Jan 22, 2024
@vladdoster vladdoster self-assigned this Jan 22, 2024
@vladdoster vladdoster changed the title bug: zinit update --parallel leaves some zombie background process [bug]: zinit update --parallel leaves some zombie background process Jan 22, 2024
@OmeletWithoutEgg
Copy link

FYR, I added

if (( main_counter == 0 )) {
    wait
}

locally, after

zinit/zinit-autoload.zsh

Lines 3459 to 3470 in f26d387

if (( counter > OPTS[value] || main_counter == 0 )) {
wait ${(k)PUAssocArray}
local ind_file
for ind_file ( ${^${(von)PUAssocArray}}.ind(DN.) ) {
command cat ${ind_file:r}
(( !OPTS[opt_-d,--debug] && !ZINIT[DEBUG_MODE] )) && \
command rm -f $ind_file
}
(( !OPTS[opt_-d,--debug] && !ZINIT[DEBUG_MODE] )) && \
command rm -f ${(v)PUAssocArray}
counter=0
PUAssocArray=()

so that there is no zombie jobs left. Not sure if this is the correct way to fix it and why is the extra wait needed.

@Juici Juici linked a pull request Oct 20, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants