Exit the process from the signal handler.

This commit is contained in:
Josh Matthews 2018-11-23 16:26:19 -05:00
parent d9b76ef7d0
commit 17850090a0
4 changed files with 5 additions and 5 deletions

1
Cargo.lock generated
View file

@ -3640,6 +3640,7 @@ dependencies = [
"glutin 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", "glutin 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
"keyboard-types 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "keyboard-types 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"libservo 0.0.1", "libservo 0.0.1",
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
"osmesa-src 0.1.0 (git+https://github.com/servo/osmesa-src)", "osmesa-src 0.1.0 (git+https://github.com/servo/osmesa-src)",

View file

@ -49,6 +49,7 @@ glutin = "0.19"
keyboard-types = "0.4.3" keyboard-types = "0.4.3"
lazy_static = "1" lazy_static = "1"
libservo = {path = "../../components/servo"} libservo = {path = "../../components/servo"}
libc = "0.2"
log = "0.4" log = "0.4"
tinyfiledialogs = "3.0" tinyfiledialogs = "3.0"
winit = {version = "0.18", features = ["icon_loading"]} winit = {version = "0.18", features = ["icon_loading"]}

View file

@ -13,6 +13,7 @@ mod resources;
mod browser; mod browser;
use backtrace::Backtrace; use backtrace::Backtrace;
use libc::_exit;
use servo::{Servo, BrowserId}; use servo::{Servo, BrowserId};
use servo::compositing::windowing::WindowEvent; use servo::compositing::windowing::WindowEvent;
use servo::config::opts::{self, ArgumentParsingResult, parse_url_or_filename}; use servo::config::opts::{self, ArgumentParsingResult, parse_url_or_filename};
@ -42,7 +43,6 @@ fn install_crash_handler() {}
fn install_crash_handler() { fn install_crash_handler() {
use backtrace::Backtrace; use backtrace::Backtrace;
use sig::ffi::Sig; use sig::ffi::Sig;
use std::intrinsics::abort;
use std::thread; use std::thread;
fn handler(_sig: i32) { fn handler(_sig: i32) {
@ -52,9 +52,7 @@ fn install_crash_handler() {
.unwrap_or("".to_owned()); .unwrap_or("".to_owned());
println!("Stack trace{}\n{:?}", name, Backtrace::new()); println!("Stack trace{}\n{:?}", name, Backtrace::new());
unsafe { unsafe {
// N.B. Using process::abort() here causes the crash handler to be _exit(sig);
// triggered recursively.
abort();
} }
} }

View file

@ -1,4 +1,4 @@
[sigsegv.html] [sigsegv.html]
type: testharness type: testharness
prefs: [dom.testbinding.enabled:true, dom.testable_crash.enabled:true] prefs: [dom.testbinding.enabled:true, dom.testable_crash.enabled:true]
disabled: https://github.com/servo/servo/issues/14067 expected: CRASH