mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
add __exit
This commit is contained in:
parent
00e3ec1446
commit
65100d19fc
7
lib/emscripten/src/exit.rs
Normal file
7
lib/emscripten/src/exit.rs
Normal file
@ -0,0 +1,7 @@
|
||||
use wasmer_runtime_core::vm::Ctx;
|
||||
|
||||
// __exit
|
||||
pub fn __exit(_ctx: &mut Ctx, value: i32) {
|
||||
debug!("emscripten::__exit {}", value);
|
||||
::std::process::exit(value);
|
||||
}
|
@ -32,6 +32,7 @@ mod env;
|
||||
mod errno;
|
||||
mod exception;
|
||||
mod exec;
|
||||
mod exit;
|
||||
mod io;
|
||||
mod jmp;
|
||||
mod linking;
|
||||
@ -443,6 +444,9 @@ pub fn generate_emscripten_env(globals: &mut EmscriptenGlobals) -> ImportObject
|
||||
// exec
|
||||
"_execvp" => func!(crate::exec::_execvp),
|
||||
|
||||
// exit
|
||||
"__exit" => func!(crate::exit::__exit),
|
||||
|
||||
// Env
|
||||
"___assert_fail" => func!(crate::env::___assert_fail),
|
||||
"_getenv" => func!(crate::env::_getenv),
|
||||
|
Loading…
Reference in New Issue
Block a user