-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore SIGTERM signal exceptions. (#269)
* Ignore SIGTERM signal exceptions. * Fix bug caused by missing jruby signm implementation * Fix failing test caused by missing signal normalization
- Loading branch information
1 parent
e495f43
commit c21d5c1
Showing
4 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
require 'honeybadger' | ||
|
||
CRASHES = { | ||
"system_exit" => ->{ exit -1 }, | ||
"sigterm" => ->{ raise SignalException, "TERM" }, | ||
"hup" => ->{ raise SignalException, "SIGHUP" }, | ||
} | ||
|
||
crash_type = ARGV.first || (raise "Invalid argument") | ||
|
||
(CRASHES[crash_type] || ->{ raise "Invalid crash type" }).() |