| 93 | */ |
| 94 | |
| 95 | int |
| 96 | auth_cat(const char *file) |
| 97 | { |
| 98 | int fd, count; |
| 99 | char buf[BUFSIZ]; |
| 100 | |
| 101 | if ((fd = open(file, O_RDONLY | O_CLOEXEC)) < 0) |
| 102 | return 0; |
| 103 | while ((count = read(fd, buf, sizeof(buf))) > 0) |
| 104 | (void)write(fileno(stdout), buf, count); |
| 105 | close(fd); |
| 106 | sleep(5); /* wait an arbitrary time to drain */ |
| 107 | return 1; |
| 108 | } |
no test coverage detected