4 #include <sys/procfs.h>
5 #include <sys/stropts.h>
8 int main(int argc, char *argv[])
15 if ((pid = fork()) == 0) {
20 sprintf(proc, "/proc/%d", pid);
22 if ((pfp = fopen(proc, "r+")) == NULL)
25 if (ioctl(fileno(pfp), PIOCSTOP, NULL) < 0)
31 if (poll(&pfd, 1, 0) < 0)
34 if (!(pfd.revents & POLLPRI))