Lines Matching refs:bytes_read
481 static size_t bytes_read = 0; in listen_child() local
485 assert(bytes_read < LBUF_SIZE - 1); in listen_child()
489 rv = read(fd, buf + bytes_read, LBUF_SIZE - bytes_read - 1); in listen_child()
493 bytes_read += rv; in listen_child()
494 assert(bytes_read <= LBUF_SIZE - 1); in listen_child()
501 while ((cp = memchr(buf, '\n', bytes_read)) != NULL) { in listen_child()
503 assert(bytes_line <= bytes_read); in listen_child()
505 bytes_read -= bytes_line; in listen_child()
506 memmove(buf, cp + 1, bytes_read); in listen_child()
509 if (bytes_read < LBUF_SIZE - 1) in listen_child()
511 do_output(buf, bytes_read, logpar); in listen_child()
512 bytes_read = 0; in listen_child()
524 if (bytes_read > 0) { in listen_child()
525 do_output(buf, bytes_read, logpar); in listen_child()
526 bytes_read = 0; in listen_child()