Lines Matching refs:bytes_read
460 static size_t bytes_read = 0; in listen_child() local
464 assert(bytes_read < LBUF_SIZE - 1); in listen_child()
466 rv = read(fd, buf + bytes_read, LBUF_SIZE - bytes_read - 1); in listen_child()
470 bytes_read += rv; in listen_child()
471 assert(bytes_read <= LBUF_SIZE - 1); in listen_child()
478 while ((cp = memchr(buf, '\n', bytes_read)) != NULL) { in listen_child()
480 assert(bytes_line <= bytes_read); in listen_child()
482 bytes_read -= bytes_line; in listen_child()
483 memmove(buf, cp + 1, bytes_read); in listen_child()
486 if (bytes_read < LBUF_SIZE - 1) in listen_child()
488 do_output(buf, bytes_read, logpar); in listen_child()
489 bytes_read = 0; in listen_child()
501 if (bytes_read > 0) { in listen_child()
502 do_output(buf, bytes_read, logpar); in listen_child()
503 bytes_read = 0; in listen_child()