ipc/chromium/src/base/debug_util_mac.cc

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
     2 // Use of this source code is governed by a BSD-style license that can be
     3 // found in the LICENSE file.
     5 #include "base/debug_util.h"
     7 #include <signal.h>
     9 #include "base/basictypes.h"
    11 static void ExitSignalHandler(int sig) {
    12   exit(128 + sig);
    13 }
    15 // static
    16 void DebugUtil::DisableOSCrashDumps() {
    17   int signals_to_intercept[] ={SIGINT,
    18                                SIGHUP,
    19                                SIGTERM,
    20                                SIGABRT,
    21                                SIGILL,
    22                                SIGTRAP,
    23                                SIGEMT,
    24                                SIGFPE,
    25                                SIGBUS,
    26                                SIGSEGV,
    27                                SIGSYS,
    28                                SIGPIPE,
    29                                SIGXCPU,
    30                                SIGXFSZ};
    31   // For all these signals, just wire thing sup so we exit immediately.
    32   for (size_t i = 0; i < arraysize(signals_to_intercept); ++i) {
    33     signal(signals_to_intercept[i], ExitSignalHandler);
    34   }
    35 }

mercurial