From 583e3a5f0b1978a73ba1b69c4d3ce963675a22c2 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Thu, 28 Oct 2021 15:34:02 -0400 Subject: [PATCH] use 11 for the panic exit code --- internal/logging/panic.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/logging/panic.go b/internal/logging/panic.go index 2bc763f9d..785cbfb6f 100644 --- a/internal/logging/panic.go +++ b/internal/logging/panic.go @@ -42,7 +42,11 @@ func PanicHandler() { // When called from a deferred function, debug.PrintStack will include the // full stack from the point of the pending panic. debug.PrintStack() - os.Exit(2) + + // An exit code of 11 keeps us out of the way of the detailed exitcodes + // from plan, and also happens to be the same code as SIGSEGV which is + // roughly the same type of condition that causes most panics. + os.Exit(11) } const pluginPanicOutput = `