blob: 3d699784aa43bb4f514198e98b39864f4a497e80 (
plain) (
blame)
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
30
|
#ifndef VIS_SUBPROCESS_H
#define VIS_SUBPROCESS_H
#include "vis-core.h"
#include "vis-lua.h"
typedef struct Process Process;
#if CONFIG_LUA
typedef int Invalidator(lua_State*);
#else
typedef void Invalidator;
#endif
struct Process {
char *name;
int outfd;
int errfd;
int inpfd;
pid_t pid;
Invalidator** invalidator;
Process *next;
};
typedef enum { STDOUT, STDERR, SIGNAL, EXIT } ResponseType;
VIS_INTERNAL Process *vis_process_communicate(Vis *, const char *command, const char *name,
Invalidator **invalidator);
VIS_INTERNAL int vis_process_before_tick(fd_set *);
VIS_INTERNAL void vis_process_tick(Vis *, fd_set *);
VIS_INTERNAL void vis_process_waitall(Vis *);
#endif
|