From edfe3dfb47bd3248a588c2eb89224f59939bd626 Mon Sep 17 00:00:00 2001 From: Derek Sollenberger Date: Wed, 19 Jul 2017 15:25:24 -0400 Subject: Add option to ignore SIGINT when running DM on Android. Bug: skia:6856 Change-Id: Iaaad2c22988cf8058304b7396c7d24eacd2f3edb Reviewed-on: https://skia-review.googlesource.com/24745 Reviewed-by: Mike Klein Reviewed-by: Eric Boren Commit-Queue: Derek Sollenberger --- dm/DM.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'dm/DM.cpp') diff --git a/dm/DM.cpp b/dm/DM.cpp index ef048a48d7..06ad765f3d 100644 --- a/dm/DM.cpp +++ b/dm/DM.cpp @@ -89,6 +89,8 @@ DEFINE_bool(forceRasterPipeline, false, "sets gSkForceRasterPipelineBlitter"); DEFINE_pathrenderer_flag; #endif +DEFINE_bool(ignoreSigInt, false, "ignore SIGINT signals during test execution"); + using namespace DM; using sk_gpu_test::GrContextFactory; using sk_gpu_test::GLTestContext; @@ -278,6 +280,10 @@ static void find_culprit() { for (int sig : kSignals) { previous_handler[sig] = signal(sig, crash_handler); } + + if (FLAGS_ignoreSigInt) { + signal(SIGINT, SIG_IGN); + } } #endif -- cgit v1.2.3