• Elias Naur's avatar
    runtime: when dying from a signal use the previous signal handler · 5500c9ce
    Elias Naur authored
    Before this CL, whenever the Go runtime wanted to kill its own
    process with a signal dieFromSignal would reset the signal handler
    to _SIG_DFL.
    
    Unfortunately, if any signal handler were installed before the Go
    runtime initialized, it wouldn't be invoked either.
    
    Instead, use whatever signal handler was installed before
    initialization.
    
    The motivating use case is Crashlytics on Android. Before this CL,
    Crashlytics would not consider a crash from a panic() since the
    corresponding SIGABRT never reached its signal handler.
    
    Updates #11382
    Updates #20392 (perhaps even fixes it)
    Fixes #19389
    
    Change-Id: I0c8633329433b45cbb3b16571bea227e38e8be2e
    Reviewed-on: https://go-review.googlesource.com/49590
    Run-TryBot: Elias Naur <elias.naur@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    5500c9ce
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...