mirror of
https://github.com/servo/servo.git
synced 2025-09-09 14:38:21 +01:00
Exit the process from the signal handler.
This commit is contained in:
parent
d9b76ef7d0
commit
17850090a0
4 changed files with 5 additions and 5 deletions
|
@ -49,6 +49,7 @@ glutin = "0.19"
|
|||
keyboard-types = "0.4.3"
|
||||
lazy_static = "1"
|
||||
libservo = {path = "../../components/servo"}
|
||||
libc = "0.2"
|
||||
log = "0.4"
|
||||
tinyfiledialogs = "3.0"
|
||||
winit = {version = "0.18", features = ["icon_loading"]}
|
||||
|
|
|
@ -13,6 +13,7 @@ mod resources;
|
|||
mod browser;
|
||||
|
||||
use backtrace::Backtrace;
|
||||
use libc::_exit;
|
||||
use servo::{Servo, BrowserId};
|
||||
use servo::compositing::windowing::WindowEvent;
|
||||
use servo::config::opts::{self, ArgumentParsingResult, parse_url_or_filename};
|
||||
|
@ -42,7 +43,6 @@ fn install_crash_handler() {}
|
|||
fn install_crash_handler() {
|
||||
use backtrace::Backtrace;
|
||||
use sig::ffi::Sig;
|
||||
use std::intrinsics::abort;
|
||||
use std::thread;
|
||||
|
||||
fn handler(_sig: i32) {
|
||||
|
@ -52,9 +52,7 @@ fn install_crash_handler() {
|
|||
.unwrap_or("".to_owned());
|
||||
println!("Stack trace{}\n{:?}", name, Backtrace::new());
|
||||
unsafe {
|
||||
// N.B. Using process::abort() here causes the crash handler to be
|
||||
// triggered recursively.
|
||||
abort();
|
||||
_exit(sig);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue