kill_process
Terminate a process by PID with graceful SIGTERM, or force immediate SIGKILL. Automatically protects critical system processes from being killed.
Instructions
Terminates a process by PID. Sends SIGTERM (graceful) by default; SIGKILL if force=True. Refuses to kill critical system processes (PID 1, launchd, systemd, init, kernel_task, core Windows services). Always confirm with the user before calling.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | Yes | The PID of the process to terminate (positive integer). | |
| force | No | If true, send SIGKILL (immediate). Default false (SIGTERM, graceful). |