diff options
Diffstat (limited to 'vis-subprocess.h')
| -rw-r--r-- | vis-subprocess.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/vis-subprocess.h b/vis-subprocess.h new file mode 100644 index 0000000..2e4c222 --- /dev/null +++ b/vis-subprocess.h @@ -0,0 +1,30 @@ +#ifndef VIS_SUBPROCESS_H +#define VIS_SUBPROCESS_H +#include "vis-core.h" +#include "vis-lua.h" +#include <sys/select.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; + +Process *vis_process_communicate(Vis *, const char *command, const char *name, + Invalidator **invalidator); +int vis_process_before_tick(fd_set *); +void vis_process_tick(Vis *, fd_set *); +#endif |
