#include #include #include #include void *thr(void *arg) { for (;;) close(open("./test.dat", O_RDWR|O_CREAT, 0666)); return (NULL); } int main() { pthread_t td; pthread_create(&td, NULL, thr, NULL); for (;;) rfork(RFCFDG); return (0); }