mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
Added ___syscall57 emscripten syscall
This commit is contained in:
parent
d1c8d34270
commit
a85e02fe6e
@ -271,6 +271,11 @@ pub fn generate_emscripten_env<'a, 'b>() -> ImportObject<&'a str, &'b str> {
|
||||
"___syscall142",
|
||||
ImportValue::Func(syscalls::___syscall142 as _),
|
||||
);
|
||||
import_object.set(
|
||||
"env",
|
||||
"___syscall57",
|
||||
ImportValue::Func(syscalls::___syscall57 as _),
|
||||
);
|
||||
|
||||
// Process
|
||||
import_object.set("env", "abort", ImportValue::Func(process::em_abort as _));
|
||||
|
@ -52,6 +52,7 @@ use libc::{
|
||||
writev,
|
||||
select,
|
||||
FIONBIO,
|
||||
setpgid,
|
||||
};
|
||||
|
||||
/// exit
|
||||
@ -729,3 +730,17 @@ pub extern "C" fn ___syscall142(
|
||||
|
||||
unsafe { select(nfds, readfds_ptr, writefds_ptr, 0 as _, 0 as _) }
|
||||
}
|
||||
|
||||
// setpgid
|
||||
pub extern "C" fn ___syscall57(
|
||||
_which: c_int,
|
||||
mut varargs: VarArgs,
|
||||
instance: &mut Instance,
|
||||
) -> c_int {
|
||||
debug!("emscripten::___syscall57 (setpgid)");
|
||||
let pid: i32 = varargs.get(instance);
|
||||
let pgid: i32 = varargs.get(instance);
|
||||
unsafe {
|
||||
setpgid(pid, pgid)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user