Lines Matching refs:bytes_read
640 static size_t bytes_read = 0; in listen_child() local
644 assert(bytes_read < LBUF_SIZE - 1); in listen_child()
646 rv = read(fd, buf + bytes_read, LBUF_SIZE - bytes_read - 1); in listen_child()
650 bytes_read += rv; in listen_child()
651 assert(bytes_read <= LBUF_SIZE - 1); in listen_child()
658 while ((cp = memchr(buf, '\n', bytes_read)) != NULL) { in listen_child()
660 assert(bytes_line <= bytes_read); in listen_child()
662 bytes_read -= bytes_line; in listen_child()
663 memmove(buf, cp + 1, bytes_read); in listen_child()
666 if (bytes_read < LBUF_SIZE - 1) { in listen_child()
669 do_output(buf, bytes_read, state); in listen_child()
670 bytes_read = 0; in listen_child()
682 if (bytes_read > 0) { in listen_child()
683 do_output(buf, bytes_read, state); in listen_child()
684 bytes_read = 0; in listen_child()