Full list of processes created on macOS?

I’m using Local Version 9.2.2+6771 on macOS Sequoia 15.3.1.

Earlier today I encountered an issue where Local was stuck on “Stopping…” a site. I resolved this by quitting Local and restarting the site, then stopping it again. It stopped without any issue.

However, I noticed afterwards that there were a couple of php-fpm processes left over. I ended up restarting my computer to ensure any left over processes from quitting Local before the site was stopped were cleaned up.

However, I’d like to avoid restarting my computer if possible, so I was wondering if there is an exhaustive list of processes that are spun up by Local so I could check for them and quit them manually via Activity Monitor should this happen again.

I know to check for:

  • mysqld
  • php-fm
  • Local
  • Local Helper

But, are there more? Is there any way to find this out?

Great question, @mlco, and welcome to the Local community!

If you open Activity Monitor when Local is running normally and at least one site has started, then choose View → All Processes, Hierarchically in Activity Monitor, you can scroll down to Local and find all processes it normally spawns:

You’ll notice some processes not in your original list:

  • mailpit — to capture emails, accessible from the Tools → Mailpit tab.
  • nginx — to serve sites.
  • httpd — to serve sites if you manually select Apache.

As well as the ones you already know about:

  • mysqld
  • php-fpm
  • Local
  • Local Helper (GPU)
  • Local Helper (renderer)

Local tries to clean up these processes when it quits normally, but they may outlive Local if a subprocess cannot be stopped in good time or if Local itself quits unexpectedly or is force-quit. In that situation you will no longer see a “Local” or Local Helper process in Activity Monitor, but should still be able to find running processes from the list above.

When you’ve found one of those, such as mailpit, you can double click it or press the “i” button from the Activity Monitor menu bar. This will show you its process group, which the (recently terminated) Local app created child processes under:

Once you have the process group ID, you can gracefully terminate all running child processes with that group in your terminal like this (replacing 30775 with the relevant process group):

kill -TERM -30775

You shouldn’t have to do this very often because Local tries to clean up after itself when it can, but hopefully that helps in other situations.

You might want to switch your Activity Monitor back to View → All Processes when you’re done to restore it to a flat list.

2 Likes

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.