summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2019-08-16 12:18:32 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2019-08-16 12:18:32 (GMT)
commit4f28dd2d8ad1f112a203cb7aa5f2609a90b6418a (patch) (side-by-side diff)
tree6432129e9bc0f36f4ef0b2b87e985fcda8f93c56
parentd5bf414da37b54bba279cc32cf23065dd3f04045 (diff)
downloadposixruncapture-4f28dd2d8ad1f112a203cb7aa5f2609a90b6418a.tar.gz
posixruncapture-4f28dd2d8ad1f112a203cb7aa5f2609a90b6418a.tar.bz2
Upgrade runcap
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--capture.c7
m---------runcap0
2 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) {
diff --git a/runcap b/runcap
-Subproject 1309ae35b1ff7ed26a3ccc2fcdc6bd13bb494ce
+Subproject 12c5eac517cb62728b5525cab25aff245086525

Return to:

Send suggestions and report system problems to the System administrator.