程序的执行结果如下: Process executed system call ID = 11 Process executed system call ID = 45 with return value= 134520832 Process executed system call ID = 192 with return value= -1208934400 Process executed system call ID = 33 with return value= -2 Process executed system call ID = 5 with return value= -2 ... 其中,11号系统调用就是execve,45号是brk,192是mmap2,33是access,5是open...经过比对可以发现,和strace的输出结果一样。当然strace进行了更详尽和完善的处理,我们这里只是揭示其原理,感兴趣的同学可以去研究一下strace的实现。