Lines Matching refs:bytes_read
508 static size_t bytes_read = 0; in listen_child() local
512 assert(bytes_read < LBUF_SIZE - 1); in listen_child()
514 rv = read(fd, buf + bytes_read, LBUF_SIZE - bytes_read - 1); in listen_child()
518 bytes_read += rv; in listen_child()
519 assert(bytes_read <= LBUF_SIZE - 1); in listen_child()
526 while ((cp = memchr(buf, '\n', bytes_read)) != NULL) { in listen_child()
528 assert(bytes_line <= bytes_read); in listen_child()
530 bytes_read -= bytes_line; in listen_child()
531 memmove(buf, cp + 1, bytes_read); in listen_child()
534 if (bytes_read < LBUF_SIZE - 1) in listen_child()
536 do_output(buf, bytes_read, logpar); in listen_child()
537 bytes_read = 0; in listen_child()
549 if (bytes_read > 0) { in listen_child()
550 do_output(buf, bytes_read, logpar); in listen_child()
551 bytes_read = 0; in listen_child()