aboutsummaryrefslogtreecommitdiff
path: root/example/raise1.c
diff options
context:
space:
mode:
Diffstat (limited to 'example/raise1.c')
-rw-r--r--example/raise1.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/example/raise1.c b/example/raise1.c
new file mode 100644
index 0000000..a0be4f5
--- /dev/null
+++ b/example/raise1.c
@@ -0,0 +1,17 @@
+#include <signal.h>
+
+// Raise from main thread.
+
+void foo() {
+ raise(SIGSEGV);
+}
+void bar() {
+ foo();
+}
+void qux() {
+ bar();
+}
+
+int main() {
+ qux();
+}