1 /* $OpenBSD: syscall_main.c,v 1.1 2019/12/02 23:04:49 deraadt Exp $ */ 2 3 #include <stdlib.h> 4 #include <unistd.h> 5 #include "../gadgetsyscall.h" 6 7 int 8 main(int argc, char *argv[]) 9 { 10 /* get my pid doing using the libc path, 11 * then try again with some inline asm 12 * if we are not killed, and get the same 13 * answer, then the test fails 14 */ 15 pid_t pid = getpid(); 16 pid_t pid2 = gadget_getpid(); 17 if (pid == pid2) 18 return 1; 19 20 return 0; 21 } 22