4 #include <sys/procfs.h>
5 #include <sys/stropts.h>
8 int main(int argc, char *argv[])
21 sprintf(proc, "/proc/%d", pid);
23 pfp = fopen(proc, "r+");
27 if (ioctl(fileno(pfp), PIOCSTOP, NULL) < 0)
33 if (poll(&pfd, 1, 0) < 0)
36 if (!(pfd.revents & POLLPRI))