Skip to content

Commit 21dbb4d

Browse files
committed
short: update mod.rs
1 parent 811c821 commit 21dbb4d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/platform/mod.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,14 @@ pub fn init(platform_data_by_loader: usize) {
4545
}
4646
#[cfg(not(test))]
4747
pub fn try_exit() {
48-
let pd = services::platform_data();
49-
if pd.env_id == services::ENV_ID_LINUX {
50-
#[cfg(not(target_arch = "wasm32"))]
48+
#[cfg(not(all(target_arch = "x86_64", feature = "short")))] {
49+
let pd = services::platform_data();
50+
if pd.env_id == services::ENV_ID_LINUX {
51+
#[cfg(not(target_arch = "wasm32"))]
52+
unsafe { os::linux::syscall::exit_group(services::get_exit_status() as usize); }
53+
}
54+
}
55+
#[cfg(all(target_arch = "x86_64", feature = "short"))] {
5156
unsafe { os::linux::syscall::exit_group(services::get_exit_status() as usize); }
5257
}
5358
}

0 commit comments

Comments
 (0)