| 1 | #include <signal.h> |
|---|---|
| 2 | #include <sys/syscall.h> |
| 3 | |
| 4 | int main() { |
| 5 | // Get the current thread ID |
| 6 | pid_t tid = syscall(SYS_gettid); |
| 7 | // Send a SIGSEGV signal to the current thread |
| 8 | syscall(SYS_tkill, tid, SIGSEGV); |
| 9 | return 0; |
| 10 | } |
| 11 |
| 1 | #include <signal.h> |
|---|---|
| 2 | #include <sys/syscall.h> |
| 3 | |
| 4 | int main() { |
| 5 | // Get the current thread ID |
| 6 | pid_t tid = syscall(SYS_gettid); |
| 7 | // Send a SIGSEGV signal to the current thread |
| 8 | syscall(SYS_tkill, tid, SIGSEGV); |
| 9 | return 0; |
| 10 | } |
| 11 |