What "Killed: 9" means in macOS Terminal and how to fix it
Codemia Knowledge Hub ·
Killed: 9 means the process received signal 9, SIGKILL, which stops it immediately without any chance to clean up or print an error. The signal is the effect, not the cause, so fixing it means finding out who sent it and why.
What signal 9 is
SIGKILL is the kill signal that a process cannot catch or ignore on Unix-like systems. It can come from:
- your own
kill -9command - another privileged process
- the kernel under memory pressure
- a macOS security mechanism rejecting the process
Memory pressure
A common cause is the system terminating a process that uses too much memory. This is especially likely with browsers, machine learning tools, large compilers and data-processing jobs. Check memory in Activity Monitor or from Terminal:
If the process dies when its memory use spikes, reduce the workload, close other heavy apps, or otherwise cut memory demand.
A kill you sent yourself
Sometimes the process really was killed from another shell or a script, with commands like:
If a script or supervisor manages the process, inspect that control path before blaming macOS.
Quarantine and code-signing problems
macOS may start an unsigned or quarantined binary and then terminate it because it does not trust the binary or its environment. Check for quarantine attributes:
If quarantine metadata is present and you trust the binary, removing the attribute may be part of the fix:
Only do this when you know where the binary came from and why you trust it.
Reading the macOS logs
When the cause is not obvious, the system log says more than the terminal does:
Or search for the process name:
The log can show whether the process was ended by memory pressure, policy enforcement or another system component.
Apple Silicon and binary compatibility
On Apple Silicon Macs, some older binaries still depend on Rosetta or specific library combinations, and an incompatible binary can fail as an abrupt termination. Check its architecture:
For an Intel-only binary on Apple Silicon, confirm Rosetta is installed and that the toolchain is actually compatible.
Wrapper scripts and the real executable
The process being killed may be an interpreter or a child launched by a wrapper script rather than the command you typed. Confirm the exact executable path and its permissions:
If a script launches a different binary than you expect, the real problem is one layer deeper.
Debugging order
- check whether memory pressure is the cause
- check whether you or a supervisor sent
SIGKILL - inspect the macOS logs
- verify the binary's architecture and trust state
- reduce the workload or replace the problematic binary
Working through these steps is more reliable than guessing from the terminal message alone.
Related reading
- What is loss_cls and loss_bbox and why are they always zero in training
- What is not assignable to parameter of type never error in TypeScript?
- What is NSZombie?
- What is pkg-resources0.0.0 in output of pip freeze command
- What is reason for getting ProducerFencedException during producer.send?
- What is responsible for this TypeError DataUndersampler.transform missing 1 required positional argument 'y'?
- What is the best way to catch exception in Task?
- What is the best way to return different types of ResponseEntity in Spring-Boot Error Handling for REST with Spring
.png&w=3840&q=75)
Tackling System Design Interview Problems
A short course that equips you with the skills to approach system design interviews methodically.
Start the free courseNo course covers this one yet
Basis Lab writes one for you from a sentence about what you want to be able to do, then teaches it and checks you understood. Your first course is free.
Build my courseInterview Questions practice on Codemia
Over 11,000 interview practice questions for 300+ companies, searchable by company and role.