aboutsummaryrefslogtreecommitdiff
path: root/runcap.h
diff options
context:
space:
mode:
Diffstat (limited to 'runcap.h')
-rw-r--r--runcap.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/runcap.h b/runcap.h
index 0ece8e7..efafdf3 100644
--- a/runcap.h
+++ b/runcap.h
@@ -31,6 +31,7 @@ struct stream_capture
void (*sc_linemon)(const char *, size_t, void *);
/* Line monitor function */
void *sc_monarg; /* Line monitor argument */
+ int sc_nocap; /* If 1, capturing is disabled */
};
#define STRCAP_BUFSIZE 4096
@@ -57,13 +58,12 @@ struct runcap
#define RCF_PROGRAM 0x0001 /* rc_program is set */
#define RCF_TIMEOUT 0x0002 /* rc_timeout is set */
#define RCF_STDIN 0x0004 /* rc_cap[RUNCAP_STDIN] is set */
-#define RCF_STDOUT_SIZE 0x0008
-#define RCF_STDOUT_LINEMON 0x0010
-#define RCF_STDERR_SIZE 0x0020
-#define RCF_STDERR_LINEMON 0x0040
-
-int stream_capture_init(struct stream_capture *fc, size_t size);
-void stream_capture_free(struct stream_capture *fc);
+#define RCF_STDOUT_SIZE 0x0008 /* rc_cap[RUNCAP_STDOUT].sc_size is set */
+#define RCF_STDOUT_LINEMON 0x0010 /* rc_cap[RUNCAP_STDOUT].sc_linemon is set */
+#define RCF_STDERR_SIZE 0x0020 /* rc_cap[RUNCAP_STDERR].sc_size is set */
+#define RCF_STDERR_LINEMON 0x0040 /* rc_cap[RUNCAP_STDERR].sc_linemon is set */
+#define RCF_STDOUT_NOCAP 0x0080 /* disable stdout capturing */
+#define RCF_STDERR_NOCAP 0x0100 /* disable stderr capturing */
int runcap(struct runcap *rc, int flags);
void runcap_free(struct runcap *rc);
@@ -80,7 +80,7 @@ runcap_get_capture(struct runcap *rc, int stream)
fp = &rc->rc_cap[stream];
- if (!fp->sc_base || fp->sc_size == 0) {
+ if (!fp->sc_base || fp->sc_size == 0 || fp->sc_nocap) {
errno = EINVAL;
return NULL;
}

Return to:

Send suggestions and report system problems to the System administrator.