Stop a background command
Stops a backgrounded command and answers the handle as it was when it stopped, with whatever it had printed and not yet been read.
The signal goes to the PROCESS GROUP, so a command that started children takes them with it: TERM first, then KILL if it is still there when the grace period ends. killed on the answer means this call did the stopping — including when the command had in fact already ended and nothing had noticed yet, so do not read it as "your command was cut short". See the field.
A handle answers 404 from ten minutes after its command exits, and after the daemon on the computer’s host restarts — the same 404 as a pid that never existed. A stopped or suspended computer answers 409 with reason: "unavailable", and this route does not resume it. A suspended one still holds the command: after a resume, its output and exit code can be read again.
Only commands this API started can be stopped this way, and a {pid} that is not a number is a 400 rather than a 404.
Requires the member role or higher.
Request
- Base URL: https://app.mandala.computer/api/v1
- URL: https://app.mandala.computer/api/v1/computers/{id}/exec/{pid}
- Auth: HTTP bearer
Path parameters
The computer id.
The guest pid from a backgrounded exec.
Response
The handle as it was when the command was stopped.
Changes
No recorded changes to this operation across all 1 revision of this API.