Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

about multiple process of zsh #6

Open
cyantau opened this issue Aug 14, 2022 · 1 comment
Open

about multiple process of zsh #6

cyantau opened this issue Aug 14, 2022 · 1 comment

Comments

@cyantau
Copy link

cyantau commented Aug 14, 2022

After using mtoe to install zsh, there seems to appear many process when type ps to check.

$ps

  PID TTY          TIME CMD
 4397 pts/0    00:00:00 ps
30375 pts/0    00:00:07 zsh
31460 pts/0    00:00:00 zsh
31461 pts/0    00:00:00 zsh
31464 pts/0    00:00:00 zsh
31536 pts/0    00:00:00 gitstatusd-linu

So why could be like this and is there any approach to avoid?

@2moe
Copy link
Collaborator

2moe commented Aug 15, 2022

This may be caused by the theme.
First, run zshtheme to change your theme, then restart the zshell or terminal, finally run ps -ef | grep zsh


So, why are there so many processes? Is this situation bad?

This will be analysed on a case-by-case basis.
In some cases, they are just useless zombie processes.
In other cases, it may be the product of "asynchronous".


So, what is asynchronous? And, what is the difference between concurrency and parallelism?

In fact, we don't need to know that much.
All we need to know is that sometimes asynchronous can "look" faster than synchronous.

When we queue, we can listen to music on our bluetooth headphones instead of standing around silently.
Sometimes doing two things at once can make everything worse.
Other times, that's not so bad.


Run htop and type /zsh to check the status of zsh.
Are these processes using a lot of memory and CPU resources?
If not, then I don't think there's any need to care about it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants