How to stop a dev server that is still running on a Mac
Open Disk, then Monitor, then Ports, find the server in the list and press Stop. The button changes to Stop? in red. Press it a second time on the same row and NotchStar sends the process a normal quit request. It does not force anything.
Steps
- Open the notch, choose Disk, then Monitor, then Ports.
- Find the row. Use the filter if the list is long. You can type the port, the project name or part of the command.
- Check the project folder and the command line. Make sure it is the server you mean. A database or a tool you use should not be on your stop list.
- Press Stop. It turns into Stop? in red.
- Press it again. A short message says “Asked” followed by the process name “to quit”. If the request could not be sent, it says it could not stop it.
- After a few seconds the row should disappear on the next refresh. If it does not, the program is ignoring the request, as a stuck or busy program might.
What Stop sends
Stop sends SIGTERM, the standard polite request. Many dev servers catch it, close their sockets and exit. It cannot be sent to processes owned by another user, because macOS does not allow it, and NotchStar does not ask for administrator rights. It never sends SIGKILL.
If it does not stop
Go back to the terminal where it was started and press Control + C. If the terminal is gone, find the process in Activity Monitor and use its Force Quit, which is a decision for you. NotchStar will not make it.
Limits
- Your own processes only.
- No force option. That is deliberate.
- Two presses on the same row. If you press Stop on one row and then a different row, the confirmation moves.
- Unsaved work in the process is lost if the program exits without saving. A dev server usually has none, but check.
- Restarts. A process manager or a file watcher may start the server again straight away.
- It does not clean up files such as lock files a server left behind.
Check what is using a port first if you only know the port. If your fan is spinning and you do not know why, see finding the busiest process. The Disk page lists the safety rules for the whole tab.