container exec accepts --ulimit but ignores it
- Dominant language
- Swift
- Stars
- 49.9k
- Forks
- 1.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 22
Description
`container exec --help` lists `--ulimit Set resource limits (format: =[:])`, and the flag parses without error, because `ContainerExec` embeds `Flags.Process`. Nothing on the exec path ever reads `processFlags.ulimits` though: `grep -rn '\.ulimits' Sources` hits only `Parser.swift`, which is the run/create path, so exec just inherits the init process rlimits and the value you passed is dropped silently. The guest already honors per-process rlimits on exec (containerization's `vmexec/ExecCommand.swift` calls `App.setRLimits(rlimits: process.rlimits)`), so the plumbing is there and only the CLI side is missing. `container machine run` has the same gap. A PR follows.
Contributor guide
Research direction
Start with ContainerExec and its embedded Flags.Process, then compare the existing ulimits handling in Parser.swift with containerization's vmexec/ExecCommand.swift. Run container exec --help and exercise the relevant commands; done means the supplied limits are applied for both container exec and container machine run instead of being silently dropped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100