> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rebind.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# rb.process

> Find running processes by name, list them, and end one by its pid.

`rb.process` looks up the programs running on the computer and can end one. A
script reaches for it to check whether a game or tool is open before it acts,
or to close a program it no longer wants running. Every name match ignores case
and matches anywhere in the process name, so `"notepad"` finds `notepad.exe`.

This script lists every Notepad process, then ends the first one it finds:

```luau theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
-- rebind: min_sdk=3.9.0 name=example version=1.0.0
for _, entry in rb.process.list("notepad") do
  print(entry.pid, entry.name)
end

local pid = rb.process.exists("notepad")
if pid == nil then
  print("notepad is not running")
elseif rb.process.kill(pid) then
  print("ended", pid)
else
  print("could not end", pid)
end
```

| Signature | Returns |
| - | - |
| `rb.process.exists(name: string) -> number?` | the pid of the first process whose name contains `name`, ignoring case |
| `rb.process.list(name: string?) -> { ProcessEntry }` | `{ pid, name }` for every process, filtered the same way |
| `rb.process.kill(pid: number) -> boolean` | `true` when the process was killed; `false` when it does not exist or the system refuses |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.