aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2019-08-16 15:42:32 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2019-08-16 15:42:32 +0300
commit98ecb66f95cf705fad1d45fde3d1bbe387b9b69e (patch)
treea12c875be80feab0a537b146e81c8fdb562f45b1
parent4f28dd2d8ad1f112a203cb7aa5f2609a90b6418a (diff)
downloadposixruncapture-98ecb66f95cf705fad1d45fde3d1bbe387b9b69e.tar.gz
posixruncapture-98ecb66f95cf705fad1d45fde3d1bbe387b9b69e.tar.bz2
Minor change
* capture.c (capture_run): Explict flushing of line monitors is no longer needed.
-rw-r--r--capture.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/capture.c b/capture.c
index 3a89e12..454a779 100644
--- a/capture.c
+++ b/capture.c
@@ -261,27 +261,8 @@ capture_next_line(struct capture *cp, int fd)
int
capture_run(struct capture *cp)
{
- int res;
-
if (!cp->rc.rc_argv)
- croak("no command line given");
-
- res = runcap(&cp->rc, cp->flags);
-
- if (cp->flags & RCF_STDOUT_LINEMON && cp->closure[0].len) {
- call_monitor(cp->closure[0].cv,
- cp->closure[0].str,
- cp->closure[0].len);
- cp->closure[0].len = 0;
- }
-
- if (cp->flags & RCF_STDERR_LINEMON && cp->closure[1].len) {
- call_monitor(cp->closure[1].cv,
- cp->closure[1].str,
- cp->closure[1].len);
- cp->closure[1].len = 0;
- }
-
- return res == 0;
+ croak("no command line given");
+ return runcap(&cp->rc, cp->flags) == 0;
}

Return to:

Send suggestions and report system problems to the System administrator.