X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Fasync.c;h=f3d1a5ba13b36354d23bdf309ae28d8c75617bd3;hp=e5b9078dbda65c5c36b6b46636b4fad365fd586e;hb=HEAD;hpb=9961094e2422cf0c2d9cb21387da7c65ddddafe2 diff --git a/tools/ccanlint/async.c b/tools/ccanlint/async.c index e5b9078d..3f88bbcd 100644 --- a/tools/ccanlint/async.c +++ b/tools/ccanlint/async.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -150,11 +151,12 @@ static void reap_output(void) int old_len, len; /* This length includes nul terminator! */ old_len = tal_count(c->output); - tal_resize(&c->output, old_len + 1024); - len = read(c->output_fd, c->output + old_len - 1, 1024); + tal_resize(&c->output, old_len + 65536); + len = read(c->output_fd, c->output + old_len - 1, 65536); if (len < 0) err(1, "Reading from async command"); - tal_resize(&c->output, old_len + len); + if (len != 65536) + tal_resize(&c->output, old_len + len); c->output[old_len + len - 1] = '\0'; if (len == 0) { struct rusage ru;