]>
git.saurik.com Git - apple/xnu.git/blob - tools/tests/unit_tests/pipe_test_10807398_src/parent.c
7 int main(int argc
, char **argv
)
10 char *args
[3], buf
[32];
12 extern char **environ
;
19 snprintf(buf
, sizeof buf
, "%d", fd
[0]);
25 switch (pid
= fork()) {
31 execve(args
[0], args
, environ
);
39 printf("parent poll(%d)...\n", pfd
.fd
);
41 r
= poll(&pfd
, 1, -1);
42 printf("parent poll(%d) returned %d errno %d[%s]\n",
43 pfd
.fd
, r
, errno
, strerror(errno
));
44 write(fd
[1], "howdy", 5);
46 printf("parent done\n");