fix: write runtime pidfile when provided #439
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ensure the PID is written to the runtime-provided --pid-file after container creation. This allows supervisors like conmon to track and reap the container process correctly, preventing early cleanup or EOF failures. This change also ensures that Podman can reliably start urunc containers.
Description
In the current code, there is a --pid-file flag, but in reality, we are not actually writing to the specified pid-file. This causes issues when starting urunc with Podman, preventing it from starting properly.
Related issues
#114
How was this tested?
I tested using the method described in Check integration of urunc with podman #114 and configured Podman to use urunc as the runtime. I executed the following command to modify the Podman container configuration:
To ensure urunc can locate the QEMU binary, the QEMU path needs to be set in the config.toml file for urunc. The configuration should look like this:
Run urunc with Podman
After configuring the runtime and QEMU path, I attempted to run the urunc container using Podman:
result:

LLM usage
Using Codex to debug the cause of the issue#114
Checklist
make lint).make test_ctr,make test_nerdctl,make test_docker,make test_crictl).