summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-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.