vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
vis-subprocess.h
(688B)
1 #ifndef VIS_SUBPROCESS_H
2 #define VIS_SUBPROCESS_H
3 #include "vis-core.h"
4 #include "vis-lua.h"
5 #include <sys/select.h>
6
7 typedef struct Process Process;
8 #if CONFIG_LUA
9 typedef int Invalidator(lua_State*);
10 #else
11 typedef void Invalidator;
12 #endif
13
14 struct Process {
15 char *name;
16 int outfd;
17 int errfd;
18 int inpfd;
19 pid_t pid;
20 Invalidator** invalidator;
21 Process *next;
22 };
23
24 typedef enum { STDOUT, STDERR, SIGNAL, EXIT } ResponseType;
25
26 Process *vis_process_communicate(Vis *, const char *command, const char *name,
27 Invalidator **invalidator);
28 int vis_process_before_tick(fd_set *);
29 void vis_process_tick(Vis *, fd_set *);
30 void vis_process_waitall(Vis *);
31 #endif