You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(process_cmd): Add fallback option for killing unregistered PIDs
This change introduces a new `--force-shell` flag to the `process kill` command, allowing users to forcefully terminate processes that aren't tracked by the Process API using shell commands.
The documentation has also been updated to reflect these changes and clarify usage instructions.
Co-developed-by: Aone Copilot <noreply@alibaba-inc.com>
Signed-off-by: Sodawyx <sodawyx@126.com>
|`--code`| string | one of || Inline code to run. |
173
173
|`--file`| path | one of || Path to a code file. |
174
-
|`--language`| string | no |`python`|`python` or `javascript`. |
174
+
|`--language`| string | no |`python`when `--context-id` is not set; mutually exclusive with `--context-id`|`python` or `javascript`. Passing both `--context-id` and `--language` is an error. |
175
175
|`--context-id`| string | no || Stateful context id (see [context](#context-sub-group)). |
176
176
|`--timeout`| int | no |`30`| Execution timeout (seconds). |
177
177
@@ -369,11 +369,16 @@ ar sandbox process get sb-001 1234
369
369
### process kill
370
370
371
371
```
372
-
ar sandbox process kill <SANDBOX_ID> <PID>
372
+
ar sandbox process kill <SANDBOX_ID> <PID> [--force-shell]
373
373
```
374
374
375
+
| Flag | Default | Description |
376
+
|------|---------|-------------|
377
+
|`--force-shell`| false | If the Process API does not know this PID, fall back to `kill -9 <PID>` via the shell. Useful for ending PIDs that appear in `process list` but were not started through the Process API. |
@click.option("--language", default=None, help="Language: python / javascript. Defaults to python when --context-id is not set; must be omitted when --context-id is set.")
19
19
@click.option("--context-id", default=None, help="Context ID for stateful execution.")
0 commit comments