Skip to content

Comments

guest/server: pass exit code back to pid1#201

Merged
slp merged 1 commit intoAsahiLinux:mainfrom
valpackett:val/mzxsrxpqwvmz
Oct 31, 2025
Merged

guest/server: pass exit code back to pid1#201
slp merged 1 commit intoAsahiLinux:mainfrom
valpackett:val/mzxsrxpqwvmz

Conversation

@valpackett
Copy link
Contributor

libkrun's built-in init supports reporting the exit code back to the host from the program it launches. Let's not break the chain here!

@valpackett
Copy link
Contributor Author

Bubbled up the whole command_exited_code = Some(..) assignment to make it clear that we have to decide on an exit code in all branches, no matter how it exited. Looks better to me at least :)


let mut server_died = false;
let mut command_exited = false;
let mut command_exited_code = None;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
let mut command_exited_code = None;
let mut command_exit_code = None;

nit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suure. I tried to make it clearer that "it definitely had exited if this is Some" with the name, but evidently that was too awkward and unnecessary :)

libkrun's built-in init supports reporting the exit code back to the host
from the program it launches. Let's not break the chain here!

Signed-off-by: Val Packett <val@invisiblethingslab.com>
@slp slp merged commit 158def6 into AsahiLinux:main Oct 31, 2025
2 checks passed
@valpackett valpackett deleted the val/mzxsrxpqwvmz branch November 3, 2025 00:15
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.

3 participants