Make --kill long-option-only, no -k short form
Per the user's request: --kill is destructive enough (stops every process a session started) that typo-prone brevity isn't worth it -- dropping the short option makes it harder to invoke by mistake. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gv3s5jckJKzh6JkMoi2Akz
This commit is contained in:
@@ -59,7 +59,7 @@ slocker-lite -c|--cleanup <layer-id>
|
||||
slocker-lite -l|--list-images <directory>
|
||||
slocker-lite -i|--inspect <image.tar>
|
||||
slocker-lite -x|--exec <pid> [-- <command> [args...]]
|
||||
slocker-lite -k|--kill <pid>
|
||||
slocker-lite --kill <pid>
|
||||
slocker-lite -v|--volume <name> <directory>
|
||||
slocker-lite --list-volumes
|
||||
slocker-lite --delete-volume <name>
|
||||
@@ -87,7 +87,7 @@ slocker-lite -V|--version
|
||||
| `-l, --list-images <dir>` | List OCI Image Layout tars (`*.tar`, `*.tar.*`) found directly in `<dir>`, with their `name:tag`. |
|
||||
| `-i, --inspect <image.tar>` | Print an image's declared user, exposed ports, env, volumes, and default command, without mounting or running it. |
|
||||
| `-x, --exec <pid>` | Join an already-running `--run` session (`<pid>` must be one `--list-processes` shows as `running`) and run a command inside its container. Pass `-- <command> [args...]` to specify it. |
|
||||
| `-k, --kill <pid>` | Stop a running `--run` session (`<pid>` must be one `--list-processes` shows as `running`): sends `SIGTERM`, waits up to 10s, then forces it with `SIGKILL`. Reaches every process the session started — including daemonized/reparented ones a plain `kill <pid>` would leave behind — via a dedicated cgroup when available, or the sandboxed pid namespace's own collapse-on-kill guarantee when not, falling back to signaling the tracked pid alone if neither applies. |
|
||||
| `--kill <pid>` | Stop a running `--run` session (`<pid>` must be one `--list-processes` shows as `running`): sends `SIGTERM`, waits up to 10s, then forces it with `SIGKILL`. Reaches every process the session started — including daemonized/reparented ones a plain `kill <pid>` would leave behind — via a dedicated cgroup when available, or the sandboxed pid namespace's own collapse-on-kill guarantee when not, falling back to signaling the tracked pid alone if neither applies. |
|
||||
| `-v, --volume <name> <dir>` | Create a named volume mapped to a host directory (created if missing), recorded in the config file's `volumes` section. Fails if the name or directory is already used by an existing volume. Volume names can't contain `/`. With `--run`, instead mounts a volume into the sandbox (repeatable): `<name>` is an existing named volume, or, if it contains `/`, a host directory path (created if missing); `<dir>` is the absolute path inside the container to mount it at. If the host directory is empty and the image already has content there, that content is copied in first, preserving numeric ownership/permissions/links and, where the host filesystem supports them, extended attributes/ACLs (skipped with a warning otherwise). |
|
||||
| `--list-volumes` | List all named volumes (see `-v/--volume`) with their host directory. |
|
||||
| `--delete-volume <name>` | Remove a named volume from the config. The host directory is left untouched. |
|
||||
@@ -214,13 +214,13 @@ rather than joining the outer `bwrap` process's own namespaces, so the joined
|
||||
command sees the container's process tree and hostname too, not just its
|
||||
filesystem.
|
||||
|
||||
`-k/--kill <pid>` stops a running session and everything it started — not just
|
||||
`--kill <pid>` stops a running session and everything it started — not just
|
||||
the tracked `bwrap` process. A plain `kill <pid>` can leave processes behind: a
|
||||
container whose entrypoint daemonizes a service (double-forks and detaches)
|
||||
before `exec`-ing its main command can end up with that service reparented
|
||||
somewhere `bwrap` dying never reaches, especially on a kernel without pid
|
||||
namespace support, where it reparents all the way to the *host's* own pid 1.
|
||||
`-k/--kill` picks between three mechanisms depending on what's actually
|
||||
`--kill` picks between three mechanisms depending on what's actually
|
||||
available for that session: a dedicated cgroup (set up at `-r/--run` time,
|
||||
reliably includes every process the session ever started regardless of
|
||||
daemonizing or pid namespace support — the most complete option, when the
|
||||
|
||||
Reference in New Issue
Block a user