13 assert(write(1, "", 1) == 1);
24 struct timespec ts = { .tv_nsec = 10000000 };
28 assert(pipe(fds) == 0 && fds[0] == 0 && fds[1] == 1);
30 for (i = 0; i < T; ++i)
31 assert(pthread_create(&t, NULL, thread, NULL) == 0);
32 for (i = 0; i < T; ++i)
33 assert(read(0, fds, 1) == 1);
35 (void) nanosleep(&ts, 0);
45 for (i = 0; i < P; ++i) {
46 assert((p = fork()) >= 0);
49 assert(waitpid(p, &s, 0) == p && WIFEXITED(s));
51 return WEXITSTATUS(s);