Skip to content

Make LinuxPod.stopContainer return ExitStatus explicitly#762

Open
noah-thor wants to merge 1 commit into
apple:mainfrom
noah-thor:stop-container-exit-status
Open

Make LinuxPod.stopContainer return ExitStatus explicitly#762
noah-thor wants to merge 1 commit into
apple:mainfrom
noah-thor:stop-container-exit-status

Conversation

@noah-thor
Copy link
Copy Markdown

Update LinuxPod.stopContainer API to return the ExitStatus explicitly when the function call performs the kill and reaping itself. This lets callers observe the correct exit code without having to rely on other mechanisms.

Update LinuxPod.stopContainer API to return the ExitStatus explicitly
when the function call performs the kill and reaping itself.
This lets callers observe the correct exit code without having to rely
on other mechanisms.

/// Stop a container from executing.
public func stopContainer(_ containerID: String) async throws {
///
Copy link
Copy Markdown
Member

@dcantah dcantah Jun 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I know we talked about this, but does this offer anything that just calling waitContainer right after stopContainer returns not give? If anything I'd love if we had some functionality to cache the exit code so we don't actually need to do an RPC, and then waitContainer (and wait on LinuxProcess which it just trampolines to) just returns a cached integer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants