check_fd
else if ((fd = check_fd(s, W_OK, &emsg)) < 0) {
else if ((fd = check_fd(cp, R_OK, &emsg)) < 0) {
} else if ((u = check_fd(cp,
int check_fd ARGS((char *, int, const char **));
result = read(check_fd, drain, sizeof(drain));
close(check_fd);
int nfd, check_fd;
else if ((check_fd = open(check_file, O_RDONLY, 0)) < 0) {
check_fd = open(check_file, O_WRONLY | O_CREAT, 0644);
if (check_fd < 0) {
fds[0].fd = check_fd;
if ((result = read(check_fd, &ref, 1)) < 1) {
if ((result = write(check_fd, &data, 1)) < 1)
void check_fd(int);
check_fd(STDIN_FILENO);
check_fd(STDOUT_FILENO);
check_fd(STDERR_FILENO);