Signal a process (E2B envd)
envd's `process.Process/SendSignal` (the SDKs' `commands.kill` and a handle's `kill`). `SIGNAL_SIGKILL` or `SIGNAL_SIGTERM` to the process and its process group; `not_found` for an unknown pid.
POST
/compat/e2b/envd/process.Process/SendSignal
envd's `process.Process/SendSignal` (the SDKs' `commands.kill` and a handle's `kill`). `SIGNAL_SIGKILL` or `SIGNAL_SIGTERM` to the process and its process group; `not_found` for an unknown pid.
Header Parameters
X-Access-Token
string
required
header
The sandbox's envd access token (`b3os_et_…`), from the create or connect answer.
E2b-Sandbox-Id
string
required
header
The sandbox the call is for (`sandboxID` of the create answer). The token must be this sandbox's.
Request Body required
application/jsonobject
Responses
200
Sent.
application/jsonobject
401
The envd call is refused (`envd_token_invalid`), the same answer on every envd path whatever the reason, in E2B's error shape (Connect clients read the 401 as `unauthenticated`).
curl -X POST 'https://beta-api.b3os.org/compat/e2b/envd/process.Process/SendSignal' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'X-Access-Token: string' \ -H 'E2b-Sandbox-Id: string' \ -H 'Content-Type: application/json' \ -d '{ "process": { "pid": 412 }, "signal": "SIGNAL_SIGKILL"}'
const response = await fetch('https://beta-api.b3os.org/compat/e2b/envd/process.Process/SendSignal', { method: 'POST', headers: { "Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json", "X-Access-Token": "string", "E2b-Sandbox-Id": "string" }, body: JSON.stringify({ "process": { "pid": 412 }, "signal": "SIGNAL_SIGKILL" })});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'X-Access-Token': 'string', 'E2b-Sandbox-Id': 'string'}response = requests.post('https://beta-api.b3os.org/compat/e2b/envd/process.Process/SendSignal', headers=headers, json={ "process": { "pid": 412 }, "signal": "SIGNAL_SIGKILL"})print(response.json())
200
Response
{}
API Playground
Try this endpoint
POST
/compat/e2b/envd/process.Process/SendSignal