testsuite/systemtap.syscall/exit.c
raw| 1 | /* COVERAGE: exit */ |
| 2 | |
| 3 | #include <unistd.h> |
| 4 | #include <linux/unistd.h> |
| 5 | #include <sys/syscall.h> |
| 6 | |
| 7 | int main () |
| 8 | { |
| 9 | // Note we have to use syscall here, since glibc's exit() function |
| 10 | // calls exit_group() instead of exit() since glibc 2.3. |
| 11 | syscall(SYS_exit, (int)-1); |
| 12 | //staptest// exit (-1) = |
| 13 | return 0; |
| 14 | } |