Skip to content

Commit

Permalink
Merge pull request hermit-os#1467 from hermit-os/exit_code_message
Browse files Browse the repository at this point in the history
feat: add stable exit code message in non-Uhyve VMs
  • Loading branch information
stlankes authored Nov 26, 2024
2 parents 4c2ff09 + 2c82e96 commit 0f296c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/syscalls/interfaces/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ pub trait SyscallInterface: Send + Sync {
}

fn shutdown(&self, error_code: i32) -> ! {
// This is a stable message used for detecting exit codes for different hypervisors.
println!("exit status {error_code}");

arch::processor::shutdown(error_code)
}
}
1 change: 0 additions & 1 deletion src/syscalls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ pub(crate) fn get_application_parameters() -> (i32, *const *const u8, *const *co
pub(crate) fn shutdown(arg: i32) -> ! {
// print some performance statistics
crate::arch::kernel::print_statistics();
info!("shutting down with code {arg}");

SYS.shutdown(arg)
}
Expand Down

0 comments on commit 0f296c6

Please sign in to comment.