在ptrace时使用waitpid(-1, &status, 0);无法正常trace 修改为waitpid(-1, &status, __WALL);即可 原因是: 转载于:https://www.cnblogs.com/beixiaobei/p/9536565.html