aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/proc.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/proc.go')
-rw-r--r--src/runtime/proc.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go
index 68296bd1e4..c5bf537a75 100644
--- a/src/runtime/proc.go
+++ b/src/runtime/proc.go
@@ -10,6 +10,7 @@ import (
"internal/goarch"
"internal/goos"
"internal/runtime/atomic"
+ "internal/runtime/exithook"
"internal/stringslite"
"runtime/internal/sys"
"unsafe"
@@ -309,6 +310,12 @@ func os_beforeExit(exitCode int) {
}
}
+func runExitHooks(code int) {
+ if err := exithook.Run(code); err != nil {
+ throw(err.Error())
+ }
+}
+
// start forcegc helper goroutine
func init() {
go forcegchelper()