aboutsummaryrefslogtreecommitdiff
path: root/capture.c
diff options
context:
space:
mode:
Diffstat (limited to 'capture.c')
-rw-r--r--capture.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/capture.c b/capture.c
index 2d2bfd0..3a89e12 100644
--- a/capture.c
+++ b/capture.c
@@ -30,7 +30,12 @@ line_monitor(const char *ptr, size_t sz, void *closure)
{
struct line_closure *lc = closure;
- if (lc->len || ptr[sz-1] != '\n') {
+ if (sz == 0) {
+ if (lc->len) {
+ call_monitor(lc->cv, lc->str, lc->len);
+ lc->len = 0;
+ }
+ } else if (lc->len || ptr[sz-1] != '\n') {
size_t newsz = lc->len + sz + 1;
if (newsz > lc->size) {

Return to:

Send suggestions and report system problems to the System administrator.