aboutsummaryrefslogtreecommitdiff
path: root/capture.h
blob: 8806ea3b4fc947d1d576f20325467de582cb29ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

#include "ppport.h"

#include <stdlib.h>
#include <runcap/runcap.h>

struct line_closure
{
	char *str;
	size_t len;
	size_t size;
	SV *cv;
};

struct capture {
	struct runcap rc;
	int flags;
	struct line_closure closure[2];
};

typedef struct capture *POSIX__Run__Capture;

struct capture *capture_new(AV *av, unsigned timeout, SV *cb[2]);
void capture_DESTROY(struct capture *rc);
char *capture_next_line(struct capture *rc, int fd);
int capture_run(struct capture *cp);

Return to:

Send suggestions and report system problems to the System administrator.