summaryrefslogtreecommitdiffstats
path: root/src/runtime/testdata/testprogcgo/sigthrow.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/runtime/testdata/testprogcgo/sigthrow.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/runtime/testdata/testprogcgo/sigthrow.go b/src/runtime/testdata/testprogcgo/sigthrow.go
new file mode 100644
index 0000000..665e3b0
--- /dev/null
+++ b/src/runtime/testdata/testprogcgo/sigthrow.go
@@ -0,0 +1,20 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+// This program will abort.
+
+/*
+#include <stdlib.h>
+*/
+import "C"
+
+func init() {
+ register("Abort", Abort)
+}
+
+func Abort() {
+ C.abort()
+}