Lines Matching refs:fd
769 mmap_and_write_part(bozohttpd_t *httpd, int fd, off_t first_byte_pos, size_t sz)
796 addr = mmap(0, mappedsz, PROT_READ, MAP_SHARED, fd, mappedoffset);
1538 int fd, isindex;
1548 fd = -1;
1552 fd = open(file, O_RDONLY);
1553 if (fd >= 0)
1560 if (fd < 0)
1561 fd = open(file, O_RDONLY);
1563 if (fd < 0) {
1582 if (fstat(fd, &sb) < 0) {
1650 if (mmap_and_write_part(httpd, fd, cur_byte_pos, sz)) {
1663 close(fd);
1999 * inspired by fgetln(3), but works for fd's. should work identically
2004 bozodgetln(bozohttpd_t *httpd, int fd, ssize_t *lenp,
2026 * by becoming a fd-passing program instead of just exec'ing
2029 * the above is no longer true, we are the fd-passing
2032 for (; readfn(httpd, fd, &c, 1) == 1; ) {