| Line | |
|---|
| 1 |
#ifndef MODULES_EXTERNAL_PROC_H |
|---|
| 2 |
#define MODULES_EXTERNAL_PROC_H |
|---|
| 3 |
|
|---|
| 4 |
#include "noit_defines.h" |
|---|
| 5 |
#include "eventer/eventer.h" |
|---|
| 6 |
#include "utils/noit_atomic.h" |
|---|
| 7 |
#include "utils/noit_hash.h" |
|---|
| 8 |
|
|---|
| 9 |
struct external_response { |
|---|
| 10 |
int64_t check_no; |
|---|
| 11 |
int32_t exit_code; |
|---|
| 12 |
int stdoutlen_sofar; |
|---|
| 13 |
u_int16_t stdoutlen; |
|---|
| 14 |
char *stdoutbuff; |
|---|
| 15 |
int stderrlen_sofar; |
|---|
| 16 |
u_int16_t stderrlen; |
|---|
| 17 |
char *stderrbuff; |
|---|
| 18 |
}; |
|---|
| 19 |
typedef struct { |
|---|
| 20 |
noit_log_stream_t nlerr; |
|---|
| 21 |
noit_log_stream_t nldeb; |
|---|
| 22 |
int child; |
|---|
| 23 |
int pipe_n2e[2]; |
|---|
| 24 |
int pipe_e2n[2]; |
|---|
| 25 |
eventer_jobq_t *jobq; |
|---|
| 26 |
noit_atomic64_t check_no_seq; |
|---|
| 27 |
noit_hash_table external_checks; |
|---|
| 28 |
|
|---|
| 29 |
struct external_response *cr; |
|---|
| 30 |
} external_data_t; |
|---|
| 31 |
|
|---|
| 32 |
int external_child(external_data_t *); |
|---|
| 33 |
|
|---|
| 34 |
#endif |
|---|