-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Orphaned zsh processes from interactive shells executing commands #2642
Comments
Can you reproduce this with the following command? () {
emulate -L zsh -o err_return -o xtrace
if [[ -e ~/powerlevel10k ]]; then
command git -C ~/powerlevel10k pull
else
command git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
fi
command rm -rf ~/z
command mkdir -p ~/z
command cat >~/z/.zshrc <<\END
source ~/z/.p10k.zsh
source ~/powerlevel10k/powerlevel10k.zsh-theme
END
command cat >~/z/.p10k.zsh <<\END
POWERLEVEL9K_MODE=ascii
POWERLEVEL9K_DISABLE_HOT_RELOAD=true
END
repeat 10 ZDOTDIR=~/z command zsh --no-globalrcs -ic 'echo hi'
command sleep 1
command ps -ef | command grep -E 'echo hi$'
} |
Yes, rarely. When I do this manually from my regular shell I can reproduce almost every time. It might be a complete coincidence, but it seems to help if I start from scratch (i.e. remove
|
Can you reproduce this if you replace |
Yeah:
|
They don't linger forever, do they? |
Yes, when they hang up like this, it seems they do:
|
Interesting. I cannot reproduce this. I'll dig into this. |
Thanks, let me know if there's anything else I can do to eliminate problems here. It's a real head scratcher. |
What is the output of this command? typeset -pm 'P9K_SSH|_P9K_SSH_TTY|TTY'
true &; ZDOTDIR=~/z zsh --no-globalrcs -ic 'echo hi'; true& I am assuming you have |
|
I noticed that when using powerlevel10k, commands run by tools forcing an interactive shell leave orphaned
zsh
processes owned bylaunchd
. In this case they're doing this to get the interactive environment for the user, I believe IntelliJ and VSCode do something similar:I can reproduce if I run commands interactively:
One of the processes exits soon after, but the other stays running indefinitely:
I bisected my
.zshrc
and confirmed that disabling powerlevel10k avoids the problem. That's as much as I've been able to discover I'm afraid, it's not obvious to me which of the spawned shells this is:The text was updated successfully, but these errors were encountered: