mirror of
https://github.com/fluencelabs/wasmer
synced 2025-03-16 08:10:49 +00:00
Just install the signal handler once
This commit is contained in:
parent
f36aade2e5
commit
0e5d1172d6
@ -15,6 +15,7 @@ use std::{
|
||||
mem,
|
||||
ptr::{self, NonNull},
|
||||
slice, str,
|
||||
sync::Once,
|
||||
};
|
||||
use wasmer_runtime_core::{
|
||||
backend::{FuncResolver, ProtectedCaller, Token, UserTrapper},
|
||||
@ -258,9 +259,11 @@ impl LLVMBackend {
|
||||
)
|
||||
};
|
||||
|
||||
unsafe {
|
||||
static SIGNAL_HANDLER_INSTALLED: Once = Once::new();
|
||||
|
||||
SIGNAL_HANDLER_INSTALLED.call_once(|| unsafe {
|
||||
crate::platform::install_signal_handler();
|
||||
}
|
||||
});
|
||||
|
||||
if res != LLVMResult::OK {
|
||||
panic!("failed to load object")
|
||||
|
Loading…
x
Reference in New Issue
Block a user