LOGBUFSIZE
assert(stream->cnt <= LOGBUFSIZE);
cnt = read(stream->fd, stream->buf + stream->cnt, LOGBUFSIZE - stream->cnt);
char buf[LOGBUFSIZE+1];